Relevanssi - A Better Search
[resolved] Number of results per page varies (5 posts)

  1. TwoThirdsWater
    Posted 3 years ago #

    Firstly - thanks for this great plugin!

    I am experiencing a very strange issue though. The number of results that appear on each page varies. Page 1 might show 1 or 2 results, page 2 the same, page 3 will show 10 results, page 4 about 4 or 5. The last page in any set of results never shows any results.

    I've tried adding in the fix mentioned on the plugin site namely:

    add_filter('post_limits', 'postsperpage');
    function postsperpage($limits) {
    	if (is_search()) {
    		global $wp_query;
    		$wp_query->query_vars['posts_per_page'] = 10;
    	return $limits;

    but it hasn't fixed this issue.

    Any help much appreciated.



  2. Mikko Saari
    Plugin Author

    Posted 3 years ago #

    What are you using for paging? Do you have any filters that might interfere with the search results?

  3. TwoThirdsWater
    Posted 3 years ago #

    I'm just using the standard pagination code

    <div class="sideways_navigation">
    	                                <div class="alignleft"><?php next_posts_link('&laquo; Next Recipes') ?></div>
    	                                <div class="alignright"><?php previous_posts_link('Previous Recipes &raquo;') ?></div>

    There are no filters on results that I know of.

  4. Mikko Saari
    Plugin Author

    Posted 3 years ago #

    Unusual problem. I don't know, hard to say what's wrong without taking a closer look at the site.

  5. TwoThirdsWater
    Posted 2 years ago #

    Ah. Its taken me a while to get back to this. But it was my error - there was another filter on the results.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic