I am using Wordpress and a static homepage and a posts page to display all my news posts located here: http://www.bigideaadv.com/uptous/?page_id=13
The pagination only works on page 1 and 2. Page 3 causes errors. Also, if I try and add more posts, the pagination doesn't go above three pages.
Does anyone have any thoughts?
Posts query to follow:
$posts = query_posts($query_string.'&orderby=title&order=asc&posts_per_page=4&paged='.$paged);
Here is a simple way to do pagination without any plugin :
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
Put it in your index.php and it should works !
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.