It’s working very fine after I made some changes / adding on two php files function.php
and date.php
function.php
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' );
date.php
<?php get_header();
while (have_posts()) : the_post();
echo the_title() . '<br/><br/>';
endwhile;
wp_reset_query();
get_footer();?>
archive.php
<?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12, 'show_post_count' => 1 ) ); ?><br/>
very special thanks to @milo
Related Posts:
- WordPress Posts By Date/Day?
- Preventing 404 error on empty date archive
- Archive filtering posts by year and month
- 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?
- date.php shows only three posts’ title. how to fix it?
- How to hide the year in archive link
- Is each issue of a magazine site a static page
- Sort results by name & asc order on Archive.php
- Custom Post Type Archives by Year & Month?
- Default archive URL wordpress
- Increase number of posts in archive page
- How do I remove unwanted pages like archive, search, etc.?
- How do I place content on archive pages but not on main page?
- is_archive() returns false on the archives page
- Archive by Year
- How do I visit archive-post.php?
- How do I make wp_get_archives show me months where only pages were created?
- Archive listing of posts by publish year (multiple years)
- Create a month by month archive of pages (not posts)
- display archive as collapsing links
- How can I get the ID for an archive page? [closed]
- if in_category on archive.php
- Arrange and separate posts
- Customize first page of category
- Cache previous versions of website?
- front end publishing not working on front-end page
- How to show static placeholder when less post elements in archive page?
- condition for only if is archive for default post type
- Show only post titles in archives?
- How to hide a post from archives
- How we display Archives for specific categories
- Date archive permalinks for custom taxonomy
- How to Create Custom Archive page
- Does only custom post type have post type archive pages?
- Modify text after post count
- Custom archives function
- Page is displaying blog archives
- terms_description and admin problem
- Author archive doesn’t work [closed]
- How to conditionally check for author archive when is_author() fails to work because the author has no posts
- Is there a better way to do headings for (all) archives?
- Date Archive pages 404 error
- Constructing An if Statement with is_category(); in archive.php
- next and previous year month and day for archive page
- remove 2014 from wp_get_archives
- Get posts from a top category and group by child categories
- How can I make a page for post formats (specifically quotes) in wordpress 3.5
- How to get post archives urls list without any markup?
- Only display archive subtitle on the first archive page
- Filtering posts by archive showing all years
- Bootstrap Accordion with Dynamic content WordPress Archives Unique ID
- What do I need to style for the page after wp_get_archives?
- Secondary WP_Query being overriden in archive page
- Is there a way to multiply archive loop results sequentially?
- Add hour to archive link?
- pre_get_posts conflict with archive posts
- Custom loop in addition to default on archive page
- Show Daily Archives after specific dates
- Why does my URL keep returning 404 error code?
- Remove posts from two categories in Archive Page
- How to get the month argument from permalink in wordpress?
- Archive of year for some categories using the featured image
- Difference between $numpages & $max_page on archive pages
- Custom design calendar archive
- How to display dynamic additional contents on archive pages?
- Custom post archive page not opening 404 page
- How to show all the posts under the same Year in a page WordPress?
- Simplest way to archive a WordPress (and take down)?
- How to prevent archiving and search engine caching in a free WordPress blog?
- How to Completely Remove Archive Title a.k.a the_archive_title?
- Display archives based in post_format
- Show archives as a drop-down in the main navigation menu
- What’s wrong with default posts archive?
- How do I add a count to each month in this archive code?
- Parent and child relation code and display only first child list
- Get all posts from db between 2 specified months
- Display Day names with wp_get_archives instead of date
- date archive future posts
- Display future posts in archive
- Trying to hide subcategories which have categories without posts
- How to organise post by category and date
- Exclude a specific category link from archive / front page
- WordPress archives by custom field and date
- Generate daily archive whenever any post type is added
- Create archives by author role
- How to create an archive section of a WordPress site
- wordpress showing all posts instead of date range
- Create page like custom post type list in WordPress
- WP Archive & Category Pages not filtering
- List archive year – post by post
- Sorting past events by month
- How to display the archive for native posts
- printing taxonomy and meta fields values