Home › Forums › Support › How to show only updated date on blog and search engine This topic has 13 replies, 3 voices, and was last updated 4 years, 3 months ago by Tom. Viewing 14 posts - 1 through 14 (of 14 total) Author Posts January 6, 2020 at 1:55 am #1123268 Mfon Hello, I have tried without success to show only updated post not published date on posts and search engine. Can you help? January 6, 2020 at 4:42 am #1123379 DavidStaff Customer Support Hi there, add the PHP Snippet provided here to force the Theme to only output the modified date ( if it exists ): https://docs.generatepress.com/article/generate_post_date_output/#only-show-updated-date Whether the search engine chooses to display an updated date is down to their algorithms, the theme itself cannot force it to change January 8, 2020 at 9:11 am #1125915 Mfon Where do I add this? FUnction.php or hook? January 8, 2020 at 1:21 pm #1126115 DavidStaff Customer Support In your child theme functions.php or use the code snippets plugin. more info her: https://docs.generatepress.com/article/adding-php/ January 10, 2020 at 8:21 am #1128008 Mfon Thank you. I will like to show it in this format Updated: January 10, 2020 Can you help on this? January 10, 2020 at 12:10 pm #1128194 DavidStaff Customer Support Look for this line in the code: $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; and change it to: $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">Updated: %4$s</time>'; January 10, 2020 at 12:21 pm #1128202 Mfon Thank you. My biggest concern is changing the date format to something like this January 10, 2020 January 10, 2020 at 12:32 pm #1128213 DavidStaff Customer Support You can change the date format in Dashboard > Settings > General – it should still work with that function enabled. January 10, 2020 at 12:36 pm #1128214 Mfon Oh my bad! I forgot! Thank you January 10, 2020 at 12:37 pm #1128215 DavidStaff Customer Support Happy to be of help π January 10, 2020 at 3:53 pm #1128335 Mfon Thanks again January 10, 2020 at 5:30 pm #1128384 DavidStaff Customer Support You’re welcome January 17, 2020 at 4:33 am #1134900 Mfon Hello, The code has stopped working π January 17, 2020 at 11:10 am #1135433 TomLead Developer Lead Developer Hi there, Can you share the exact code you’re using? Also, can you make sure the date is enabled in Customize > Layout > Blog? Let me know π Author Posts Viewing 14 posts - 1 through 14 (of 14 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In