WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. TwoThirdsWater
    Member
    Posted 1 year 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.

    T

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. TwoThirdsWater
    Member
    Posted 1 year 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>
    	                            </div>

    There are no filters on results that I know of.

  4. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

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

  5. TwoThirdsWater
    Member
    Posted 11 months 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

About this Topic