The query var for pagination on a static home page is not paged
, but rather page
. https://codex.wordpress.org/Pagination#static_front_page
Static Front Page
If the pagination is broken on a static front page you have to add the “paged” parameter this way:
<?php
if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); }
elseif ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); }
else { $paged = 1; }
$the_query = new WP_Query('posts_per_page=3&paged=' . $paged);
?>
Related Posts:
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Blog posts pagination not working
- Output wp_link_pages as raw url
- How do I paginate posts page with $wpdb?
- Show a page counter for pagination
- Change Posts per page count
- Allow variable amount of comments before pagination
- How to load paginated post pages via ajax
- How to Group Posts by the First Letter or Number?
- Getting the Next and Previous Posts Titles in the Sidebar?
- Adding Post Counts to Menu (Nav) Programmatically?
- Setting pagination for images attached to a post
- Pagination not working on Custom Page Template
- Show number of posts AND number on current page
- Programmatically inserting page breaks
- I’m having some issues with previous_post_link() and next_post_link()
- Navigation link to specific user page
- Different amount of posts on homepage than paged pages
- JetPack Infinite Scroll not working on custom theme
- Load posts into sidebar and paginate via ajax?
- When paginating a Page with the tag, how can the 2nd and subsequent page styles be customised?
- A way to detect which page a post is on
- Post Navigation
- Converting multiple loops into one single loop with pagination
- how to know if the post has pagination () or not
- Unwanted Duplicate Posts Showing in Pagination Pages
- Is it possible to change the admin posts per page view?
- Lazy Load using WP_Query pagination
- Pagination on single post page?
- How to display different number of posts
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Restrict post navigation to current sub menu
- Getting content from a single *page* of a post
- get_next_post() and get_previous_post() return wrong posts
- How do I detect which page I’m on within a paginated post?
- Duplicating Table of Contents for Paginated Post
- Is it possible to create a form post wordpress custom navigation link?
- Blog post per page setting conflicting with custom WP_Query?
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- Making a custom Pagination for multi page blog post
- One menu for frontpage (one pager), and a different menu for posts
- pagination for single post by category
- 301 (static page instead latest posts)
- How to : pagination in 3 different custom loops on the same page
- Pagination with an array of post objects?
- Start WP Pagination From Number 1 in URL
- Customizing Comments on Posts
- Use two different post_per_page limits with infinite scroll
- Highlight static blog page link in header
- Start post pagination at 0 instead of 1
- Show posts count for Categories and Tags in wp_nav_menu
- using is_paged for hiding image on posts
- Why are my paginated posts always returning the same results?
- Restrict the_post-navigation to same category?
- Why won’t pagination work?
- Only show featured image on first page of paginated posts
- Custom Post Limit for homepage only without plugin?
- Add Text Domain To Post Navigation
- Pagination for normal (standard) posts on a page with a custom loop?
- How to show next/prev link, when it’s not active?
- Pagination for posts inside a specific category
- Pagination not give another posts
- Go back to the exact post page number
- Problem paginating a subquery on a post
- Pagination Stops
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- Change URL of previous posts and next posts link in WordPress
- Remove pagination if search returns empty
- How to display the pagination in my post list? [duplicate]
- How can I get the last post while on the first post for pagination? As if it were infinite
- Disable pagination in posts and pages
- Creating a link to the first post in a category
- Pagination (on the static front page) shows always the same posts
- Code to display random ordered posts in Categories across pages [duplicate]
- Count posts for pagination
- Override wp_link_pages pagebreak with filter
- How to add navigation arrows to manually slide through posts?
- Pagination for single post
- Posts are not showing up on next page.
- Can the_post_navigation() be outside of the loop?
- Admin is showing all posts on page 1
- Custom Select Query pagination not working properly
- Post of a specific category – not to be seen in paging previous/next post
- Add wp-link-pages to post
- wordpress paginate, link to the right page
- Pagination for custom query won’t let me back on page 1
- Make a paginated article (for easier reading on mobile)
- Count > 1 Navigation Slider
- Can’t get pagination to work
- How to display a paginated list of posts from one category on a page? [duplicate]
- How to inject a post within a loop
- how to add pagination to the organize series plugin
- WordPress posts loop pagination – first page return 125 posts instead of 10 and the rest return 10
- How to get pagination working with “Pending” Posts
- Page not found after clicking on pagination
- Single post pagination
- WordPress Custom Theme: My site shows the same posts on Page 1 and Page 2 and so on [duplicate]
- ‘get_previous_post’ in same category returning (!empty) when no previous post in category exists
- How can I get the first post THIS SAME CATEGORY?
- query_posts different amount of posts per page [duplicate]