WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
Possible bug when using WP PageNavi with custom queries (1 post)

  1. naifamoodi
    Member
    Posted 4 years ago #

    Hi. I just noticed this problem pertaining to a custom query that I am using on http://www.ayroo.com/

    If you visit the 3rd page i.e. http://www.ayroo.com/page/3/ and see where the next link points to, you'll notice it points to http://www.ayroo.com/page/2/

    It points to that page regardless of which page you are on. So I am guessing the plugin isn't taking the custom query into consideration. I am using the custom query to fetch entries which use a custom post type and have them displayed on the homepage. This is how the oode looks like:

    query_posts(array_merge(array('post_type' => 'review'), $wp_query->query));
    if(have_posts()) {
    	?><div class="heading">Browse Recent Reviews</div><?php
    	while(have_posts()) {
    		the_post();
    		get_template_part('loop', 'review');
    	}
    	get_template_part('navigation');
    }
    wp_reset_query();

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic