This snippet replaces the default published date by the last post update’s date in your post metas.
add_filter( 'tc_date_meta' , 'display_the_update_date'); function display_the_update_date() { return sprintf( '<a href="%1$s" title="updated %2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>' , esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) ), esc_attr( get_the_modified_date('F j, Y') ), esc_attr( get_the_modified_date('c') ), get_the_modified_date('F j, Y') ); }
Where to paste this code? => in your functions.php file. I strongly recommend to create a child theme. Download a start-up child theme here.
Everything you need to know about child theme with Customizr here.
4 thoughts on “Displaying the last post update’s date in the post metas”
Thanks for this great tutorial. This tutorial really help me. Now please tell me now it will also show this date in Google SERPs or not? I will wait for your great reply.
Hi Nicolas,
I write you because I would like to hide the permalink to the daily archive, from the article’s date (because I don’t need it); can you help me, please?
Thanks in advance for your attention!
Hi Kris, you might want to check snippets related to post metas to do this : http://www.presscustomizr.com/snippet-target/post-metas/
Hope this will help!
If you are new to Customizr (and WordPress), you might want to read this short guide on how to customize Customizr.
Then, you can you try to make a research in :
1) the Customizr theme documentation
2) the FAQ
3) how to make a research in the Customizr user’s forum
4) the Customizr code snippets
If you still have issues then post a new thread in the the Customizr user’s forum and we’ll do our best to help you.
Hello would you be able to guide me how to hide post date and the author? I went to setting>general> Custom. When I save the changes it remains the same setting as default. Reply will be appreciated. Thank you. Kris