WP-PageNavi showing same posts on all paginated pages (3 posts)

  1. antistandard
    Posted 4 years ago #

    Hello everyone,

    I am yet another person stuck with not being able to get WP-PageNavi to work properly. I don't get any errors but when I click a page number in the pagination nav, the same posts re-load and the url has "/page/3/" or whatever after it.
    I know it is not a pagenavi problem and I more to do with wordpress not knowing what page it is looking at or something.

    does anyone have a solution please as I have tried all solutions so far without success. Here is my code with the latest solution applied. Thank you

    <h4 class="underlined">Recent Posts</h4>
    	<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	$ids = array();
    	query_posts('posts_per_page=10','showposts='.$latest_num.'&cat=-1,-3,-6,-7,-14'.$breaking_cat.','.$latest_ignore.'&order=desc'.'&paged=$paged'); ?>
    	 <? if (have_posts()) : while (have_posts()) : the_post(); ?>
    	 <? $ids[]= $post->ID; ?>
    	 <? if( $post->ID == $do_not_duplicate ) continue; 	?>
    		<div id="date">
    			<span class="date-month"><?php the_time('M') ?></span>
    			<span class="date-day"><?php the_time('j') ?></span>
    			<span class="date-year"><?php the_time('Y') ?></span>
    		<div class="entry">
    			<h2><?php the_title(); ?></h2>
    			<div id="meta-post">
    				<?php include (TEMPLATEPATH . '/inc/meta-post.php' ); ?>
    			<div id="post-image">
    				<?php the_post_thumbnail( 'thumbnail' ); ?>
    			<?php the_excerpt(); ?>
    			<span class ="read_more"><a href="<?php the_permalink(); ?>">Read the Full Story</a> <span class="pipe">|</span> <span class="leave-comment"><?php comments_popup_link('Leave a Comment'); ?></span></span>
    		<? endwhile; 
    		endif; ?>
  2. stvwlf
    Posted 4 years ago #

    One thing I see that won't work is this


    it needs to be this

    Its a PHP thing.
    single quotes is a string
    double quotes inserts the value of the PHP variable into the expression

    the first one translates to

    the second one translates to

    You need the second one, which you get by using

  3. antistandard
    Posted 4 years ago #

    ok great thanks, I'll try it out when i get a chance and let you know how i go

Topic Closed

This topic has been closed to new replies.

About this Topic