Support » Plugin: WP-PageNavi » Permalink conflict with PageNavi

  • Hi there,

    My pagenavi setup is bugging in a WP_query on single posts. I found many possible solutions but none worked for me. Also I realise it is probably more related to wp itself but hopefully someone can see what I am doing wrong here.

    The problem

    • Pagenavi works fine on my category page where the function is being called after the loop with wp_pagenavi()
    • On my single page I have the same post list build with wp_query. The pagination is displayed and the pagelinks are correct (../page/2/) but when loading the url the parameters are removed and the same page is loaded

    My Setup

    • My custom permalink structure is: /%category%/%postname%/
    • My optional permalink base has no input
    • My current query is this:
                $args = array(
                   'cat' => $category_id,
    	       'posts_per_page' => 4,
    	       'paged' => get_query_var('paged')
    	    $news = new WP_Query($args);
    	    $post_counter = 0;
                while ($news->have_posts() ) : $news->the_post();

    My loop

    	    wp_pagenavi( array( 'query' => $news  ) );

    Explored solutions:

    Thanks in advance for having a look!


    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

  • The topic ‘Permalink conflict with PageNavi’ is closed to new replies.