Plugin dropping pagination variable
Plugin dropping pagination variable
Plugin dropping pagination variable
There was a plugin interfering with the code (Jetpack infinite scroll). Upon disabling it, the first page of the blog correctly displayed 10 posts.
I’ve updated the base in my $args which has resolved the issue. ‘base’ => preg_replace(‘/\?.*/’, “https://wordpress.stackexchange.com/”, get_pagenum_link()) . ‘%_%’,
Key to this was the $paged parameter and putting it in the correct query New code for getting the paged parameter for a ‘page’ if ( get_query_var( ‘paged’ ) ) { $paged = get_query_var( ‘paged’ ); } elseif ( get_query_var( ‘page’ ) ) { $paged = get_query_var( ‘page’ ); } else { $paged = 1; … Read more
WordPress pagination not working on template search.php
posts_per_page not working for first page of pagination
Use the following: $args = array( ‘post_type’ => ‘[custom post type name]’, ‘paged’ => $paged, ‘has_archieve’ => true ); $catquery = new WP_Query($args); echo pagination_bar($catquery);
How to handle paged param in post and custom-post-type?
How do you paginate a query grouped by month?
My problem is solved. To work pagination for a category, the category URL must be like… localhost/category/abc and it works fine.