- This topic has 13 replies, 3 voices, and was last updated 1 year ago by
Tom.
-
AuthorPosts
-
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 #1123379David
StaffCustomer SupportHi 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
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 8, 2020 at 9:11 am #1125915Mfon
Where do I add this? FUnction.php or hook?
January 8, 2020 at 1:21 pm #1126115David
StaffCustomer SupportIn your child theme functions.php or use the code snippets plugin.
more info her:https://docs.generatepress.com/article/adding-php/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 10, 2020 at 8:21 am #1128008Mfon
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 #1128194David
StaffCustomer SupportLook 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>';
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 10, 2020 at 12:21 pm #1128202Mfon
Thank you. My biggest concern is changing the date format to something like this January 10, 2020
January 10, 2020 at 12:32 pm #1128213David
StaffCustomer SupportYou can change the date format in Dashboard > Settings > General – it should still work with that function enabled.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 10, 2020 at 12:36 pm #1128214Mfon
Oh my bad! I forgot!
Thank you
January 10, 2020 at 12:37 pm #1128215David
StaffCustomer SupportHappy to be of help π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 10, 2020 at 3:53 pm #1128335Mfon
Thanks again
January 10, 2020 at 5:30 pm #1128384David
StaffCustomer SupportYou’re welcome
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 17, 2020 at 4:33 am #1134900Mfon
Hello,
The code has stopped working π
January 17, 2020 at 11:10 am #1135433Tom
Lead DeveloperLead DeveloperHi 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 π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.