Use the pre_get_posts
action to modify number of posts per page on date archives. This would go in your theme’s functions.php
file:
function wpa_date_posts_per_page( $query ) {
if ( !is_admin()
&& $query->is_date()
&& $query->is_main_query() ) {
$query->set( 'posts_per_page', -1 );
}
}
add_action( 'pre_get_posts', 'wpa_date_posts_per_page' );
Related Posts:
- WordPress Posts By Date/Day?
- Preventing 404 error on empty date archive
- Archive filtering posts by year and month
- How to get the date dynamically from archive.php to date.php?
- Making next_posts_link(); return posts by month
- How can I change the way dates shown in the archive widget?
- how do I get the date in a date archive page
- What’s wrong with my date_query?
- Displaying Archives List
- How to filter by date & a specific custom post type post-WP 4.4?
- Show all 12 months regardless they have posts
- How to disable date archives?
- How to hide the year in archive link
- Is each issue of a magazine site a static page
- Get list of years when posts have been published
- How can I lock down an old wordpress install I don’t intend to update?
- How can I get the Month Name from Archive?
- Archive widget – limit number of months to 12
- Including post_type = ‘wiki’ in author archives
- Output yearly archive within a page
- How to show specific year archive into dropdown list
- How to make a custom Archive Page
- Archive in sidebar with dropdown list of Year – Month – Day
- Arrange and separate posts
- How can I organize/create an archive listing by Year and month
- How to edit archive page’s content inside wordpress dashboard?
- Archive pages for posts based on their taxonomy?
- How can I get archives for specific category without category_base in the url?
- Remove author archive
- Preview Post/Custom Post types in Archive
- if there is only one post in the category, directly open
- How to disable monthly archive
- Displaying year, month and day archives differently
- When i try to open archive pages i get a 404 error
- How to Create Custom Archive page
- How to show year/month archive including months with no posts
- Archive links don’t work when clicked
- wp_get_archives() display months even if there is no posts
- how do I encode links to specific archive searches?
- Some archive by year page return 404
- Group Posts by Category in Monthly Archive
- Loop through years and months in WordPress archives
- Dropdown to select posts by month and then displaying those posts in the archive page
- If one taxonomy contains the same term as another then display post
- Having a problem with Next and Previous Links
- ‘Archive’ folder for posts and pages
- Checking if a specific date archive is being displayed
- Filter post by clickable year [duplicate]
- Wrap the “show_post_count” between div
- Is a list page usually called an archive page in WordPress?
- Get current title of archive.php
- How to show months in wordpress archive page?
- I want my yearly archives to show a list of all posts
- How can I modify this to show number of posts-per-month?
- Get archives as array
- Archive page showing wrong month
- Create an archive listing based on meta array
- Can’t Access Sessions or Variables through pages
- How to make an archive page template using WordPress 3
- How to display an archive with multiple authors
- Why is my archive.php redirecting to front-page.php?
- How to Get The Excerpt of the page that displays Blog Posts
- Where is the content that is outputted by get_the_archive_description()?
- Create simple columned archive page
- I created a normal page, but the page displays as an archive page
- Secondary WP_Query being overriden in archive page
- On my archives page, I can’t see my custom post types catergories
- How to get the Custom Post Type Archive inside a folder
- Blog pages show at most unrecognized by code
- Combining custom taxonomy posts with default posts on one archive page
- Create a custom URL for blog archive
- Show Daily Archives after specific dates
- Custom archive pages without “the loop”
- How to get type of archive whether it is post or date or category archive?
- Display an archives name
- How can I create a master archive?
- Over 500.000(!) unwanted archive pages, major duplicate content problem
- Link back to (paged) archive and find the correct page
- How can I show a list of posts using the dynamic selection box?
- Archive page no content to display
- I want to be able to access archives to see how recently a post has been read: How can I do that?
- google index an Post type page I do not want
- Change Title Based on Taxonomy Filter in archive-{cpt}.php
- How to remove or hide archive page?
- How can I modify wp_get_archives() to not use archive.php template?
- Want to display my custom date archive to date.php but dont know how
- Archives widget doesn’t work?
- Archive – Show Video from First Post
- Yearly Archive Page?
- date.php shows all posts. how to fix it?
- Show recent posts in single-post page
- How to edit wordpress post without republishing
- How can i display in themplate file only a few post
- How to create an archive section of a WordPress site
- how to hide all posts under one category
- How to remove “Archives” after category name?
- Filter the post listing for a particular category from archive month list
- How to show monthly archive posts?
- Can a scrollable date picker be done in WordPress for archives?
- How to have infinite scroll consider passed parameters?