WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
Unable to display the correct content (2 posts)

  1. gmfibres
    Member
    Posted 2 years ago #

    Hi,

    I've been wrestling with this for a few days now to no avail, so would really appreciate any help.

    I'm using the Woocommerce theme which I've heavily modified and can't seem to get pagination working correctly.

    I've got the following code as a tailored template that I'm using for a page. The correct number of pages are displayed in the links, but when clicked the content doesn't change nor does the CSS styling on the links change, but the URL does.

    $paged = (get_query_var('page')) ? get_query_var('page') : 1;
    				query_posts( array(
    					'cat' => -34,
    					'posts_per_page' =>5,
    					'paged' => get_query_var('paged')
    					) );
    
    				while ( have_posts() ) : the_post();
                                    - Doing stuff -
    				endwhile;
    				?>
    				<div class="navigation">
    					<?php wp_pagenavi(); ?>
    				</div>

    Would be incredibly grateful of any help.

    Oh also - WP 3.3.1

    Thanks,
    Matt

    http://wordpress.org/extend/plugins/wp-pagenavi/

  2. gmfibres
    Member
    Posted 2 years ago #

    I deserve to have lost the last few hours of my life for being stupid.

    There was a loop above it that was stopping it from running properly with it. Hopefully my boundless stupidity will save others the pain.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic