WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Strange bug - 'Proper Pagination' plugin changes the page but not the posts? (3 posts)

  1. rgbk
    Member
    Posted 4 years ago #

    Hi
    I'm using the Proper Pagination plugin.

    For some reason, it does not work on my homepage, but it does work on my category page.

    It changes the page in the URL but the posts stay the same as they were.
    I'm really hoping this may be an issue that seems familiar to someone, maybe it's not plugin specific, but some other kind of common but hard to find error.

    I validated this and it's got no errors:
    It's in my sidebar.php file, but as i said, this works for paging through categories but not the homepage:

    <div id="topnav_menu">
    
    		<!--  START PAGINATION  -->	
    
    		<?php if (is_home() || is_category()) :
    				if (pp_has_pagination()) : ?>
    
               		 <!-- the page links -->
               		 <li><?php while(pp_has_pagination()) : pp_the_pagination(); ?>
                 		   <?php if (pp_is_current_page()) : ?>
                		        <span class="current"><?php pp_the_page_num(); ?></span>
               		     <?php else : ?>
              		          <a href="<?php pp_the_page_permalink(); ?>"><?php pp_the_page_num(); ?></a>
             		       <?php endif; ?>
           		     <?php endwhile; pp_rewind_pagination(); ?></li>
    
           		     <!-- the previous page -->
           		     <li><?php pp_the_pagination(); if (pp_has_previous_page()) : ?>
                		    <a href="<?php pp_the_previous_page_permalink(); ?>" class="prev">Previous page</a>
              		  <?php else :  ?><span id="nolink">Previous page</span>
           		     <?php endif; pp_rewind_pagination(); ?></li>
    
            		    <li><!-- the next page -->
             		   <?php pp_the_pagination(); if (pp_has_next_page()) : ?>
            		        <a href="<?php pp_the_next_page_permalink(); ?>" class="next">Next page</a>
           		     <?php else : ?><span id="nolink">Next page</span>
          		      <?php endif; pp_rewind_pagination(); ?></li>
    
    		<?php endif; ?>
    	<?php endif;  ?>
  2. rgbk
    Member
    Posted 4 years ago #

    I removed

    <?php query_posts( array( 'post_type' => array('post') ) );

    in index.php, somehow it was making the Proper Pagination plugin bug out.

    Solved

  3. dashaluna
    Member
    Posted 3 years ago #

    Hey,

    I'm using proper pagination plugin as well. However, I have to have query_posts(). Had you any luck getting the plugin to work with it?

    Thanks :)

Topic Closed

This topic has been closed to new replies.

About this Topic