Before WordPress 4.1, you can show the date archive page titles with the following code: (Taken and slightly modified from the twentyfourteen theme)
if ( is_day() ) {
printf( __( 'Daily Archives: %s', 'twentyfourteen' ), get_the_date() );
} elseif ( is_month() ) {
printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfourteen' ) ) );
} elseif ( is_year() ) {
printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyfourteen' ) ) );
} else {
_e( 'Archives', 'twentyfourteen' );
}
As from WordPress 4.1 you can use one of the following functions
-
get_the_archive_title()
which returns the titles -
the_archive_title()
which echos the titles to screen
Related Posts:
- Displaying year, month and day archives differently
- Sort results by name & asc order on Archive.php
- Default archive URL wordpress
- Increase number of posts in archive page
- How do I remove unwanted pages like archive, search, etc.?
- Custom Post Type Archives by Date and Taxonomy
- How do I place content on archive pages but not on main page?
- Custom Post Type Archives by Date with Custom Permalink
- is_archive() returns false on the archives page
- Archive by Year
- Converting Unix timestamp to wordpress date
- How do I visit archive-post.php?
- Create a month by month archive of pages (not posts)
- Making next_posts_link(); return posts by month
- Count posts for each year
- How can I get the ID for an archive page? [closed]
- if in_category on archive.php
- custom field value date convert to unix timestamp problems
- Change behavior depending on content length
- Finding difference in days
- How to get the latest posting time of archived pages in WordPress?
- Customize first page of category
- How to get time difference between publish date and now?
- Cache previous versions of website?
- Display post links under month in paginated archive
- condition for only if is archive for default post type
- Show only post titles in archives?
- How to hide a post from archives
- WordPress outputs mm/dd but it should be opposite
- What’s wrong with my date_query?
- How we display Archives for specific categories
- timestamp and scheduled post irregularities
- Randomised Post Time
- Trouble Formatting DateTime
- Custom post type archive page thinks I’m not logged in
- How to conditionally check for author archive when is_author() fails to work because the author has no posts
- Placed on + only date (not time)
- 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
- Get current title of archive.php
- How to show months in wordpress archive page?
- Time & Date on Post – Time Ago Custom Function
- How to count the number of archives there are
- Get posts from a top category and group by child categories
- Where does the time get pulled from in the_time()
- Human time difference in months instead of days. How?
- Why is my archive.php redirecting to front-page.php?
- How to get post archives urls list without any markup?
- How can I loop only months foreach year?
- Only display archive subtitle on the first archive page
- Bootstrap Accordion with Dynamic content WordPress Archives Unique ID
- What do I need to style for the page after wp_get_archives?
- How to hide specific post type from archive?
- On my archives page, I can’t see my custom post types catergories
- Add hour to archive link?
- WordPress archives in header -necessary?
- pre_get_posts conflict with archive posts
- Custom loop in addition to default on archive page
- Any kind of custom post type in the front page and in the archive listing
- Show all 12 months regardless they have posts
- How to get the month argument from permalink in wordpress?
- Display an archives name
- Archive of year for some categories using the featured image
- Custom design calendar archive
- How to display dynamic additional contents on archive pages?
- How to show all the posts under the same Year in a page WordPress?
- How to share the author’s archive?
- How can I show a list of posts using the dynamic selection box?
- My page is shown as archive in my site
- How can I noindex my archive pages?
- Count time from registration date to today
- How to prevent archiving and search engine caching in a free WordPress blog?
- How to get Unix Local Time?
- Change Title Based on Taxonomy Filter in archive-{cpt}.php
- 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
- Archive – Show Video from First Post
- Missing content on author archive page
- Trying to hide subcategories which have categories without posts
- How to hide the year in archive link
- Show recent posts in single-post page
- How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp
- How to create an archive section of a WordPress site
- How to remove “Archives” after category name?
- Can someone explain why wordpress uses two column for storing time values?
- Create page like custom post type list in WordPress
- WP Archive & Category Pages not filtering
- List archive year – post by post
- Date is showing in unreadable format. How to convert to readable date?
- How to have infinite scroll consider passed parameters?
- How to display the archive for native posts
- WP_Query filter Posts by timestamp event (range start and end) and by month (next 12 month)
- printing taxonomy and meta fields values