Alter the main query for the front/home page with is_front_page()
and/or is_home()
, like shown below:
add_action('pre_get_posts','wpse104878_alter_main_query');
function wpse104878_alter_main_query($query){
if ( is_admin() || ! $query->is_main_query() ) {
return;
}
if( $query->is_main_query() && is_front_page() || is_home() ){
$query->query_vars['posts_per_page'] = '1';
}
}
The archive page should work, if underscore starter theme has an template for it. You can alter that separatly – similar to above function – with is_archive()
.
Related Posts:
- Template hierarchy about pagination after front-page.php
- wordpress Static Page pagination
- How to create pagination on archive.php template
- Adding pagination to a custom archive template
- Pagination is somewhat working on frontpage, doesn’t update when “prev” is clicked
- Frontpage pagination issue with paginate_links() function
- Skip first post on Category Archive
- Custom query in archive.php with pagination nightmare
- Display post links under month in paginated archive
- How to get “last year from [spec year] that has posts”?
- WordPress loading index page instead of archive.php
- How to disable pagination (next/previous links) on post type archive?
- Add additional first page, last page links to the_posts_pagination()
- Archive pagination not working
- Pagination w/Static Front Page
- /tag/tag_name/page/2 gives a 404 error
- Paginated Archives or Loop by Month
- Pagination Not Working on `WP_Query` Archive Page
- Pagination issue in archive.php
- Different layout on second page
- WP Query for all posts
- Remove “Page” from Category archive
- next and previous category name and link parent only wordpress in archive page
- Fix Pagination Directory on a page set as Front Page/Main Page [duplicate]
- Reverse ordered pagination on home page
- Is it possible to paginate posts correctly that are random ordered?
- How to determine if I’m on the first page of pagination?
- Changing pagination list class
- How to determine if theres a next page
- WordPress /page/2 404 pagination problem – what to do?
- Paged posts – how to use numbers and next/previous links?
- Why do you need an unlikely integer in paginating?
- How to display pagination links for WP_User_Query?
- How to show a single post on the front page but have normal paging?
- Custom post type pagination 404 fix?
- How to add CSS Class to previous_post_link or get previous/next post link URL
- Pagination resolving to first page only
- how to get pagination link url?
- add_rewrite_rule – working fine but broken for pagination
- How to get the number of Pages in a single Post Pagination?
- Aggregate comments, with pagination
- post pagination names, not numbers
- How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/
- Display “Page 3 of 5” for a paginated post
- Pagination throws 404 error on custom taxonomy archive pages
- Implementing a general Table of Content across single paginated post pages
- Paginate links with “ugly” and “pretty” permalinks?
- Pagination of RSS2 feed
- Strange paginate_links behavior. First page link is always whatever page I’m on, all other links are correct
- Custom Post Type Archive Page: Set Posts Per Page, Paginate
- Custom WP_Comment_Query with pagination and orderby?
- Pagination: How do I always show ‘previous’?
- Next/Previous Links in same category
- How To create ajaxed wp-pagenavi?
- Single Page View for Paginated Posts
- How can I see all of a post’s comments on a single page as a reader, if pagination is enabled?
- Multiple Paginations on one Page
- Archive page…limiting posts per page
- Using paginate_links() to generate “1, 2, 3 … 10, 20, 30, 40… 55” paginations
- Change class=”page-numbers” in pagination
- Check if on last page of paginated post using wp_link_pages
- Varying the number of posts per page from the first one
- Pagination on archive.php page
- Using pagination with get_posts on page type
- List posts based on first letter of posts
- Pagination for sub-pages
- Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)
- Custom Post Type Archives by Date (stored as meta value) WP3.1
- How to get post pagination like this
- How to paginate a list of tags
- Pagination Not Displaying on Custom Term Archive
- Non existing blog pages are not redirected to 404
- posts_per_page & pagination conflict
- How to implement pagination eg. newer – 3 – 4 – 5 – 6 – 7 – older
- How do I sort multiples pages?
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Sorting archive pages with “pretty” URLs?
- Problem: ( kriesi ) pagination doesn’t work in homepage [duplicate]
- Custom loop pagination issue ( pagination not showing up )
- WordPress pagination on custom script
- Combining WordPress pagination functions for archives and search results
- Pagination is not working wp_query custom fields values
- Custom post type archive with pagination?
- Broken pagination
- Passing custom args in paginate_links
- Limit number of pages in pagination
- Pagination causes error 404 when used with front-page.php
- Static front page with recent posts pagination
- How to ignore or disable nextpage tag?
- Paginated pages are showing correct content but pagination links are not
- Paginate tags page
- pagenavigation not showing the next page just linking back to the main page [closed]
- paginate function in archive for custom-post-type
- Category pagination shows same posts
- How to display next and prev pagination links with WP_User_Query?
- Custom taxonomy list and sortby letter pagination problem
- Paginate a list of users?
- Move pagination numbers above plug-ins
- Custom Page Template for “Older Posts” Pages
- Allow Users to Choose Pagination or Next/Previous (Combine)