Archived topic
Show updated date only through hook
3 replies · Started by Sagar on November 2, 2020
I want to show the updated date only on author box, but the data is being extracted from metadata. The code I am using to show the date on author box is given below. What code do I need to type to replace generate_do_post_meta in order to show only updated date? <?php echo generate_do_post_meta_item( 'date' ); ?>
Hi there,
use the the_modified_date function:
https://developer.wordpress.org/reference/functions/the_modified_date/#comment-666
I had already tried that, but the issue is I am getting time and location on my end. Please check the blog post of site I had provided earlier to you.
That function has lots of options, for just the date you would do:
<?php echo get_the_modified_date( 'F j, Y' ); ?>