WordPress two sidebar layout or theme

In your “Blank Slate” starter theme: STEP I: Open the functions.php and find the word: “register_sidebar”. Inside the blankslate_widgets_init() function, paste the following codes just after the register_sidebar() ends, but inside the blankslate_widgets_init() function (before closing second braces – ‘}’): register_sidebar( array ( ‘name’ => __(‘Left Widget Area’, ‘blankslate’), ‘id’ => ‘secondary-widget-area’, ‘before_widget’ => ‘<li … Read more

WordPress get number of categories

This is untested, but I think it should work. Multiple categories will result in the category__in query var containing an array of the queried categories- if( isset( $wp_query->query_vars[‘category__in’] ) && count( $wp_query->query_vars[‘category__in’] ) > 1 ){ echo ‘multiple categories queried’; }

wpalchemy repeating fields dropdown issue

I changed the code to loop through all pages, instead of using wp_dropdown_pages() function. Following is the new code <?php while($mb->have_fields_and_multi(‘col2-project’)): ?> <?php $mb->the_group_open(); ?> <p> <span>Select Project</span> <?php $mb->the_field(‘project-id-2’); ?> <select name=”<?php $mb->the_name(); ?>”> <option value=””>None</option> <?php global $thispost; $myposts = get_pages(‘post_type=portfolio&post_status=publish’); foreach($myposts as $thispost) : ?> <option value=”<?php echo $thispost->ID; ?>” <?php $mb->the_select_state($thispost->ID);?> … Read more