Archived topic
Modified Date for Posts and Pages
7 replies · Started by Muhammad Imran on August 26, 2018
I want to show last updated date with the text "Updated:" for both, posts and pages. I checked all tickets here but not found any solution.
Thanks
Hi there,
Try these couple solutions:
https://generatepress.com/forums/topic/how-to-display-last-updated-date-on-pages-and-posts/#post-485093
https://docs.generatepress.com/article/show-the-updated-post-date/
Let me know :)
These solutions worked like a charm :).
One more question, now when I hover to metadata "Date" and the text "Last Updated", I found it anchored with the article, Can I remove that link? I actually don't want any link with the date.
See the third example here:
https://docs.generatepress.com/article/generate_post_date_output/
Where should I add that code? I mean this
add_filter( 'generate_post_date_output','tu_remove_date_link', 10, 2 );
function tu_remove_date_link( $output, $time_string ) {
printf( '<span class="posted-on">%s</span>',
$time_string
);
}
thanks fixed. :)
No problem :)