How to use modal popup with tabs

<!-- Jquery --> jQuery(document).ready(function(){ $('.tabs li a:not(:first)').addClass('inactive'); $('.book-tab .containers').hide(); $('.book-tab .containers:first').show(); $('.tabs').each(function(){ $(this).find('li a').eq(0).removeClass('inactive'); $(this).parents('.mod-inner').find('.containers').eq(0).show(); }) $('.tabs li a').click(function(){ var t = $(this).attr('id'); if($(this).hasClass('inactive')){ //this is the start of our condition $(this).parents('.mod-inner').find('.tabs li a').addClass('inactive'); $(this).removeClass('inactive'); $(this).parents('.mod-inner').find('.containers').hide(); $(this).parents('.mod-inner').find('#'+ t + 'C').fadeIn('slow'); } }); }); <!-- HTML --> Intro Opinion Chapter </div> <!-- css --> <style> .tabs … Continue reading How to use modal popup with tabs

Posting via the Front End: Inserting

// shortcode: [add_deck_form_shrt] function add_deck_form( $atts ) { ob_start(); $postTitleError = ''; $postContentError = ''; if( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == "frontnewPost") { if ( trim( $_POST['postTitle'] ) === '' ) { $postTitleError = 'Please enter a Deck Name.'; $hasError = true; } if ( trim( $_POST['postContent'] ) === '' … Continue reading Posting via the Front End: Inserting

WordPress create widget with shortcode

class My_Widget extends WP_Widget { public function __construct() { $widget_ops = array('classname' => 'My_Widget', 'description' => 'Displays an My widget!' ); $this->WP_Widget('My_Widget', 'My widget', $widget_ops); } function widget($args, $instance) { // PART 1: Extracting the arguments + getting the values extract($args, EXTR_SKIP); $title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']); $text = empty($instance['text']) ? … Continue reading WordPress create widget with shortcode

How to hide custom post types from the “link to existing content” or “Insert/edit link” list in WordPress

function.php =========== add_filter('wp_link_query_args', 'wp_custom_link_query_args'); function wp_custom_link_query_args($query) { $pt_new = array(); $exclude_types = array('provider', 'supplier'); // our list of custom post types to exclude from the query foreach ($query['post_type'] as $pt) { if (in_array($pt, $exclude_types)) continue; // skip anything found in our exclude list $pt_new[] = $pt; // add anything else back to the list } … Continue reading How to hide custom post types from the “link to existing content” or “Insert/edit link” list in WordPress