Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Remove this line:

    $search = new WP_Query($search_query);

    and change this line:

    <?php if($search->have_posts()) : while($search->have_posts()) : $search->the_post(); ?>

    to

    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>

    The code in the beginning of your search results template changes the number of results displayed to 10. If you want to keep that, add this code to your theme functions.php:

    add_filter('post_limits', 'postsperpage');
    function postsperpage($limits) {
    	if (is_search()) {
    		global $wp_query;
    		$wp_query->query_vars['posts_per_page'] = 10;
    	}
    	return $limits;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Compatibility Issues with Theme’ is closed to new replies.