Try this:
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$args = array(
'posts_per_page' => 5,
'category' => 6,
'order' => 'DESC',
'paged' => $paged,
);
Currently, you are setting The paged
argument to 1
.
Related Posts:
- Pagination on archive.php page
- Having trouble generating pagination links on custom query
- query_posts and pagination, still stuck after much research
- how could I get the pagination as I want to when query posts using get_posts function
- pagination in author.php template returns 404 error
- How do i paginate query_posts with numeric pagination?
- Pagination on custom query
- Custom posts per page does not work with pagination
- WordPress pagination showing same posts on each page
- WordPress pagination with get_posts?
- Using ajax with paging and a custom sub-query
- Custom loops, sticky posts, and pagination nightmare
- Querying posts only if the current page is not paged?
- query_posts pagination will always show identical content
- Can’t get pagination to work for sticky posts only
- How do I use pagination in WordPress?
- Pagination linking to first page
- Modify main loop query for paged and meta key
- Post Filter clearing on pagination $_post
- get_next_posts_link() stops displaying at page 4
- WordPress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page
- How to Get All Posts with any post status?
- query_post by title?
- Filtering posts by post meta data
- How to query_posts using meta_query to orderby meta_key AND have a secondary sort by date?
- Help to condense/optimize some working code
- Custom Taxonomy not working with posts_per_page in new WP_query (pagination problem)
- Modify main WordPress loop with a parse_query filter
- How to make “sticky” pages (and query by them)
- Problem with ‘post__not_in’
- Sort posts alphabetically by custom field value, insert divider between different letters
- using post__in allow duplicate post id
- Use union/intersection query_posts variables in uri request parameter form?
- query_posts doesn’t order by title
- How to sort by meta value?
- query recent posts from several categories
- Example Query Posts Showing the Latest Post with the Featured Image
- Dynamically excluding current page id
- Too many posts cause slow load when paginating
- How to order results by date and meta key?
- posts_per_page => 1 shows 2 posts
- Show individual author rank from query of cumulative post view count for all authors
- Static Front-Page Excerpts
- posts_per_page override by default settings
- How to paginate posts correctly that belong to a particular category and are random ordered
- Tricky WP Query
- tax_query operator woes
- How to filter query to display posts from parent category only?
- Display random post on a page with post permalink in URL
- query_posts() on key’s value, or key’s existence
- ACF Query meta_values don’t work with ‘offset’
- How to display certain category in the loop from WordPress default post type?
- Make blog page show 10 on first page, 9 on every other page
- How to retrieve an array of post IDs by a particular value stored in a custom meta’s array
- define orderby URL with meta_key=post_views_count
- Query_posts and attachments
- how to store wordpress loop in array?
- Filter Loop by Custom Field Value
- Display custom post type by custom taxonomy
- WordPress wp_get_attachment_thumb_url full
- meta tag placement for google verification
- How to change default post type / post to media or attachments
- Frontend form with multiple posts
- Query Products & Store IDs in array
- Way to cache a query for 24 hrs
- query_posts orderby multiple ways
- Remove Post if Advanced Custom Field is checked to fix paging
- Can I use WP_Query one time and then filter the results multiple times
- Posts being viewed
- Sticky posts don’t show up first in custom loop
- Want Page Descendants when using query_posts post_parent or child_of
- show all in query_posts on category.php?
- Query Posts Incorrectly Displaying Tags Archives
- Querying a query
- Best Query for blog posts
- Most Effective Method? Exclude Category and Number of Posts Per Page
- How do I query based on the modified date?
- Custom query looking at multiple custom fields and properly sorting
- post var problem with shortcode loop
- Pre-existing arguments when using queries
- Sticky posts limit query and pagination for a custom post type
- Why does my WP_Query pagination on a custom page.php only loads the homepage?
- Get posts for each user
- Pull new posts using feed
- query_posts() with multiple meta data comparisons
- query_posts not working after wordpress 3.7 update
- Multiple post queries -category,posts per page,orderby
- Is that the query_posts() the real criminal here?
- Paginate WordPress Category Pages
- How to can I search range of products using between
- send user to first page of results when reposting to page?
- query_posts and sub pages?
- How to refine WP-Query with further criteria
- Query Posts (post meta)
- get all posts with certain meta data
- prevent display duplicate titles on main page
- Pagination in category.php not functioning
- Lots of SQL queries
- Limiting the amount of posts this displays
- How to remove post duplicate when using query_posts(‘offset=1’)