wp_get_archives()
can not display post date, but you can force wp_get_archives
to display date by using hook.
Put the following function at the end of your custom template file or functions.php file –
function wpse_the_title($title, $id){
if( $date = get_the_date('d/m/Y', $id) ){
$title = sprintf('%s - %s', $date, $title);
}
return $title;
}
Replace with appropriate code –
<?php add_filter('the_title', 'wpse_the_title', 10, 2); ?>
<ul>
<?php wp_get_archives('type=postbypost'); ?>
</ul>
<?php remove_filter('the_title', 'wpse_the_title', 10, 2); ?>
Related Posts:
- Replace Archive Widget Link Text
- wp_get_archives custom function broken since upgrading to WP 3.7.1
- wp_get_archives() output
- Simplest Way to Build Custom Archives Page?
- Create a CUstom Archive by Year, but just for a Single Category
- Why use if function_exists?
- What’s the difference between esc_html, esc_attr, esc_html_e, and so on?
- Include files in child theme functions file
- Check if post is being published for the first time, or is an already published post being updated
- How to get woocommerce inventory status [closed]
- Is there a hook or function I can use to display all theme files being used on a current page?
- Implementing DNS Prefetching with WordPress
- How can I remove the title “leave a reply” in the comment box in twentyeleven?
- Why do I get Fatal error: Call to undefined function get_most_recent_post_of_user()?
- Login using the password from protected pages
- Remove tag on my RSS Feed
- Automated mark posts as featured every day
- Enqueuing External Javascript functions.php
- Child Theme Not Overriding Parent Theme
- Function to wrap the_content in a div
- How to run a function once on every post in database?
- Checked() showing up twice in custom fields
- Date/time limitation of posts where function must be executed
- Custom image size in Media Dropdown
- Gravity Forms field entries into wp_query loop [closed]
- Update Content based on expiration time or queued processing
- How to filter a table in post content without plugins? [closed]
- Adding to fontawesome-webfont.woff2 to boost website speed
- How to enable template page only for a post id page
- Having issues with a foreach inside of a shortcode with ACF gallery
- Remove after images
- Is there an alternative to get_template_directory_uri()?
- Word Press – Dynamic Content [closed]
- Change label for registration Fields
- Warning: : DOMDocument::loadHTML(): Empty string supplied as input in functions.php when adding classes to post images
- Get First Child Page ID or Permalink in WordPress Admin
- Footer disappears when using the_content ( )
- Get page id or status by private pages?
- Categories as main menu items and subcategories as nested lists
- woocommerce change currency per category [closed]
- Using wp_redirect and .htaccess to re-route searches (and pass along the remaining GET vars)
- Connecting to a 2nd DB gives me no results when querying
- Including php files within template
- Make wp_link_pages() suitable for Twitter Bootstrap markup
- Add_filter when value is no variable?
- The Loop not looping?
- I can’t seem to install Font Awesome locally [closed]
- laoding bloginfo url in function array?
- New custom menu created. how to apply it?
- problem loading stylesheets to wp_head dynamically
- Use Composer Package inside class – Namespacing error
- Add a field into a shortcode of an extension
- Update to functions.php not showing in dashboard
- Unable to point the child theme directory even using get_stylesheet_directory()
- Need a method to prevent WP from adding in between my shortcodes
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Load scripts for do_shortcode( ‘ [ my_shortcode ] ‘ )
- Change WooCommerce add_to_cart Button Text?
- How to modify get_the_excerpt() when post-format equals ‘quote’?
- wp_get_attachment_image_src returns image on main domain, false on subdomain
- Get the alphabetical sorted data with wpdb
- New checkbox in custom widget isn’t saving data
- WordPress Check User Role Function (multiple roles)?
- Post to category based on email domain, for a post-by-email plugin
- struggling with syntax for the_post_thumbnail();
- Echo youtube code from url or shortcode
- WordPress: Highlight search result exact matches
- Woocommerce Default sorting product by product type
- Displaying registered sidebar after post content
- Adding custom social icons to the social media icon block in the Gutenberg editor?
- Allow user select role in wordpress default registration without plugin
- Display link to category over featured image
- Does hook have an effect on increasing the page load?
- Adding a schema code to one specific page using functions.php file
- Multiples functions on customize_register?
- post value to function with Ajax and jQuery
- price of product can’t return when get data of product in functions.php
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- Can You Set A Minimum Image Dimension For Resizing Images?
- Strip all HTML tags from product content and resave
- Calling hooks in functions
- Creating a “Related Meta” type field?
- Shortcode with pagination advancing multiple queries
- How to add custom column into custom post, when field is select
- How to add widget in main menu
- Function image_send_to_editor returns emty title tag
- Modified functions.php in Magazine Pro theme of Genesis. 500 error
- require_once() Causing categories and tag pages on dashboard to not refrsh
- how to create php file and load it in wordpress post?
- Integrate WP Tiles into existing loop (index.php) and theme
- wp_nav_walker that interacts with widgets to setup mega menu
- Show the online status of the current post’s author
- Functions.php in child theme that loads CSS file breaks website
- How does child theme functions.php work with parent theme functions.php? Is it like CSS? [duplicate]
- restrict access to specific urls on a specific period of time
- Change conditional tag in wordpress without editing the core files
- Need a functions that adds (adm)/(mod) if current user is admin/moderator right after their username
- clickable title of 2 post on mainpage USING functions.php
- Custom Post Type Search
- comment_post function with js not running