You can use the pre_get_posts
action to set posts_per_page
to -1
on the monthly archive pages.
I said wrongly in a comment to use is_archive()
as your conditional. The problem with is_archive()
is, it returns true on all archives, which includes category and taxonomy archive pages as well.
I would suggest to make use of is_date()
and is_month()
if you specifically needs to target montly archives
(Please note, the following code is untested and needs PHP 5.3+)
add_action( 'pre_get_posts', function ( $query ) {
if ( !is_admin() && $query->is_date() && $query->is_month() && $query->is_main_query() ) {
$query->set( 'posts_per_page', '-1' );
}
});
Related Posts:
- Highlighting Current Category in the Archive and Feeds page
- How to display by default only published posts/pages in the admin area?
- Difference between an archive and a page listing posts
- has_archive=false on the default post type
- Clear cache when a post is submitted [closed]
- List latest posts in WP-Admin
- How to put last edited entry on top of the blog-post list?
- Create an “All Posts” or “Archives” Page with WordPress 3.0?
- Post Format Archive template name for theme folder?
- widget should display post archive by year and on click also by month
- Getting an alphabetic post list with two letters onclick on letter
- Must permalinks always point to single post pages?
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- Change default screen option value for posts per page
- Display most recent post in category instead of archive?
- Single.php Active Category Class
- Hiding by default specific post status on backend list?
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- get_post_type_archive_link(‘post’) returns current category archive
- Populating a page with content from post custom fields
- How to get the latest posting time of archived pages in WordPress?
- Save list from a custom meta box?
- Filter Posts by Excluding Categories
- change default post archive page link
- Display all months with posts and inside each month show the 5 latest posts
- Display posts from #6 to #20 on archive page
- WordPress’ visual editor messing up my (nested) lists (and other things as well)
- Category List (Archive) Page Template By Category
- Getting category posts from a certain year
- Yearly archive page for future year
- Which URL to enter into browser to show all posts in archive.php?
- How to display data in archive page?
- Guest Author – How to display posts on /author/ archive page
- Archiving by academic year instead of calendar year
- Show certain posts in a LIST format that members have been granted access to
- List category posts alphabetically on archive.php
- List all categories with featured image from post?
- How to display excerpt post on hamepage and archive pages?
- Increase 10 post limit per page
- Automatically create a new page daily with last three posts
- Archiving posts in wordpress
- Conditionals if tags exist?
- How do you change the comment count in the back end posts list, to reflect unapproved comments, rather than all comments?
- Custom Post Type archive
- show posts under subcategory only when in that subcategory
- Does WP automatically tag posts into the archive?
- singular posts using archive styling
- I want to show my post for limited time, how is it possible?
- List all posts, pages and custom post types in admin
- Exclude a category of posts in author template
- How to edit the ‘
- Post-Archive like a page in a specific subdirectory
- Display in category ( taxonomy) a number of post that I want
- Find out in which kind of archive am I
- adding my posts (author posts) in menu
- How to view all posts (on site, not admin) that are uncategorized?
- Archieve page, Advertisement Every 3 Posts
- Show 10 latest posts only from users with contributors role
- How to display list of results
- How can I globally italicize list of texts in the UI database or Posts? [closed]
- Permalink Short code showing unnecessary link text inside the loop
- How to hide protected posts from archive?
- blog post not accesible on click [closed]
- Redirect to custom post if custom archive page has just one result?
- Posts are not displaying on their category and tag page
- show image gallery in archives or category page
- Prevent Archive URLs
- view a list of 3 future post, from the nearest to the most far
- Get posts from category from custom query
- How do I apply a wordpress function to something with no ID inside an archive page?
- Page 2 has no posts?
- Disable archiving of old posts?
- is_archive() not working on selected “Posts page”
- How to display term in archive page?
- My posts section for logged in user
- How to organise post by category and date
- Daily posts like an archive
- How to set a link to custom archieve page
- Create a Page Template Which Displays All Posts by Current User
- How to get alphabetic listing x other posts, based on first letter post?
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- How do I display the next 3 posts in the sidebar?
- Last three posts not being put in order by date. How to fix this?
- List posts that are in the same category as the current post title
- How to get pagination working with “Pending” Posts
- Show all posts in category
- custom sort posts in archive/taxanomy page
- how to show all post with its contents
- How to display my categories in a list (to a post, not the sidebar)?
- Add author section on Author archive posts
- Display post count on archive page in reverse order
- Dynamic archive of posts by date
- Filter/Sort Post Form On Taxonomy page
- How to add padding between posts
- Add filter-by-tag in the all posts admin console page
- How to import nested categories from XML file?
- Bootsrap carousel for post
- How to draft posts after being published with x days
- No comments allowed
- Can I hide only one category from admin post list?