- This topic has 13 replies, 3 voices, and was last updated 1 year, 6 months ago by Tom.
January 6, 2020 at 1:55 am #1123268Mfon
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 #1123379DavidStaffCustomer Support
add the PHP Snippet provided here to force the Theme to only output the modified date ( if it exists ):
Whether the search engine chooses to display an updated date is down to their algorithms, the theme itself cannot force it to changeJanuary 8, 2020 at 9:11 am #1125915Mfon
Where do I add this? FUnction.php or hook?January 8, 2020 at 1:21 pm #1126115DavidStaffCustomer Support
In your child theme functions.php or use the code snippets plugin.
more info her:January 10, 2020 at 8:21 am #1128008Mfon
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 #1128194DavidStaffCustomer 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 #1128202Mfon
Thank you. My biggest concern is changing the date format to something like this January 10, 2020January 10, 2020 at 12:32 pm #1128213DavidStaffCustomer SupportJanuary 10, 2020 at 12:36 pm #1128214Mfon
Oh my bad! I forgot!
Thank youJanuary 10, 2020 at 12:37 pm #1128215DavidStaffCustomer SupportJanuary 10, 2020 at 3:53 pm #1128335Mfon
Thanks againJanuary 10, 2020 at 5:30 pm #1128384DavidStaffCustomer SupportJanuary 17, 2020 at 4:33 am #1134900Mfon
The code has stopped working 🙁January 17, 2020 at 11:10 am #1135433TomLead DeveloperLead Developer
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 🙂
- You must be logged in to reply to this topic.