This can be done with a very short plugin.
function posts_on_home_page( $posts_per_page ) {
if ( is_home() )
return 5;
return $posts_per_page;
}
add_filter( 'pre_option_posts_per_page', 'posts_on_home_page' );
This is actually pretty close to the Codex example for pre_option_(option_name)
.
Related Posts:
- Converting multiple loops into one single loop with pagination
- Blog post per page setting conflicting with custom WP_Query?
- Blog page pagination is not working after using the offset argument
- 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
- Use two different post_per_page limits with infinite scroll
- Getting blog pagination to work on page set as front page
- Pagination for normal (standard) posts on a page with a custom loop?
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- How can I get the last post while on the first post for pagination? As if it were infinite
- Can I Paginate Post after every 25 tag?
- Posts are not showing up on next page.
- How to inject a post within a loop
- WordPress posts loop pagination – first page return 125 posts instead of 10 and the rest return 10
- Do we still need to include a “if (have_posts())” in templates?
- How to disable content pagination?
- How can I display 7 posts on the home page, but 9 posts on the subsequent pages?
- Custom Post Type Pagination Doesn’t Work in WordPress 3.4
- Newer/Older posts links display same posts on every page
- Cannot access current post’s ID in custom plugin
- Can’t show comments count per post outside loop
- Show a list of recently viewed posts to a user
- Alternate custom content in the loop
- Pagination – Posting First Page Content
- How can I get all posts data from within a paginated search result?
- Auto Refresh Post List after X seconds
- Display posts with comments closed, with pagination?
- can’t use the page_test method to check pagination
- Archive Page for Custom Post Type is not Working
- Display post category in foreach loop with category link
- How To Get Posts With A Specific Word
- How to display posts on a static page? (like search loop)
- Why WP_Query(‘showposts=5’) shows only 1 post?
- 404 on paginated blog pages
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- problems with loading posts in a table-row
- WP Query – Posts Per Page not working in combination with category__in
- More then one menu items are assigned with “current-menu-item” class
- Making a custom Pagination for multi page blog post
- How to add tags (custom taxonomy) to post class css?
- List authors with the last post title and order by last post date
- Listing Specific Categories from Current Post with Depth
- get_the_category listing in hierarchial order
- How to make a sum of all posts displayed in a loop
- Exclude current custom post on single post
- using is_paged for hiding image on posts
- First x post with another template then the others
- add bootstrap post slider with tabs
- How to add add more properties to WP_Post object in search results loop
- Custom taxonomy archive page problem
- Loop don’t work within single.php page
- Add Blog to WP homepage Manually
- Total number of posts in query (category/tag/author/search results/main page…)
- How to show all posts by author on buddypress profile with navigation
- Make loop inside slider divisible [closed]
- Change the number of excerpts displayed in search results layout
- separate the post of a category by subcategory
- How to display post list in a table layout (multiple queries in single loop)
- Not all posts showing in query
- Display 3 posts with different HTML markup using a loop
- Changing wp_link_pages() to “Next Page” and “Previous Page” buttons?
- How to repeat a loop after 4 posts [duplicate]
- How to separate each individual blog post?
- Is there a way to define the $post var outside the loop?
- Rest API Paginate until all posts are imported
- Only the most recent post is showing on my category page (working on localhost, not live site)
- Blog Posts – Scroll to view more
- Manipulated offset and pagination, can’t display last post anymore
- Pagination Not Working With Custom Post Type Category
- Alternative content between posts no repetition
- Start loop from specific post ID
- Display new posts categories in separated divs
- Wp_query loop is not working as it should
- Maximum number of posts per page before affecting performance?
- Display post order ranking within wordpress loop
- WordPress loop uses unmodified posts array, why?
- Add row after three columns
- Modify WordPress loop after it has been run
- Skip posts, but keep posts per page
- index.php is only displaying current month’s posts?
- Thumbnail With Next/Prev Links Not Showing Next Post?
- Loop doesn’t display posts. It displays a link to the home page instead
- Grab next post title in archive page
- Pagination working locally but not on live site
- Getting posts from multiple users?
- Pagination and Related Posts
- Loop through posts by each term and exclude duplicate posts assigned to several terms
- Show post if in category
- Displaying categories items among posts
- Custom Post Type Pagination 404 Error (if paged>=2) [duplicate]
- Only show posts with image and the correct ammount of posts in loop
- Related posts by searching post tags of single post as terms
- Issue with wordpress pagination: last 2 posts show again on second page
- Limit amount of pages shown in pagination within wp_query
- Show all posts in category
- First post in loop displays twice
- What function does the loop of displaying posts?
- What template file is used by default for posts?
- WordPress Ajax load doesn’t work