Custom Pagination not working
-
I am troubleshooting an issue with a custom pagination code that is listing the same posts on the second page. There are 11 posts and the Reading Settings is set to show 10 posts at most.
Here is the page:
http://griffinfertilizer.com/category/products/Here is the code in functions.php:
if ( ! function_exists( 'custom_paging_nav' ) ) : function custom_paging_nav() { global $wp_query; // Don't print empty markup if there's only one page. if ( $wp_query->max_num_pages < 2 ) return; ?> <nav class="navigation paging-navigation" role="navigation"> <div class="page_nav"> <ul> <?php if ( get_next_posts_link() ) : ?> <li class="next"><?php next_posts_link( __( '', 'twentythirteen' ) ); ?></li> <?php endif; ?> <?php if ( get_previous_posts_link() ) : ?> <li class="prev"><?php previous_posts_link( __( '', 'twentythirteen' ) ); ?></li> <?php endif; ?> </ul> </div> </nav><!-- .navigation --> <?php } endif;And this is how I am calling it:
<?php custom_paging_nav(); ?> -
This is the WordPress.COM support forum. Here we provide support only for blogs hosted by WordPress.com
You are referring to a WordPress.ORG software install and you need to post to the WordPress.ORG support forum for help with your site because it is not hosted by WordPress.COM.
WordPress.com and WordPress.org are completely separate and have different logins, features, run different versions of some themes with the same names, and have separate support forums http://support.wordpress.com/com-vs-org/
If you don’t have a username account at WordPress.ORG click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, so you can post to the support forums there and receive advice from WordPress.ORG bloggers.
- The topic ‘Custom Pagination not working’ is closed to new replies.