- This topic has 9 replies, 2 voices, and was last updated 8 years, 6 months ago by Tom.
March 21, 2015 at 1:33 am #89297Andrey
I wonder where exactly I can find the code that shows meta property=”article:modified_time” and meta property=”og:updated_time”. I would like to delete it so that this info does not show in search results.March 21, 2015 at 7:28 pm #89540TomLead DeveloperLead Developer
Adding this function to your child theme functions.php or using the plugin “Code Snippets” should remove the updated and published time schema tags: https://gist.github.com/generatepress/9986c15bbffafa0cc7e1
Let me know 🙂March 21, 2015 at 10:47 pm #89623Andrey
Tom, thank you so much for the code! So far it doesn’t work. I’ll see tomorrow if it works on new posts.
In the code description you mentioned “delete published time”. Is it really going to delete the published date? I need the original date of publication, the ones I don’t need are modified and updated.March 22, 2015 at 9:40 am #89857TomLead DeveloperLead Developer
Weird – adding that code should overwrite the default function in the theme if you added it in your child theme’s functions.php.
It basically removed the updated date/time, and removed the schema.org info from the date published.March 22, 2015 at 10:17 am #89866Andrey
I do not have a child’s theme. So I added the code throught the Code Snippets.
When you say hat the code should remove the schema.org info from the date published, does it mean there will be no published date in the code at all?March 22, 2015 at 11:25 pm #90068TomLead DeveloperLead Developer
It will still display the published date, it just won’t have the tags that tell Google the published and modified date. Humans are still able to see it. Is that what you wanted, or did you want something different?March 23, 2015 at 12:47 am #90082Andrey
I need published date both for humans and robots:
<meta property=”article:published_time” content=”2015-03-23T00:30:05+00:00″ />
What I don’t need (and what is still displayed in the html) are the following two lines of code:
<meta property=”article:modified_time” content=”2015-03-23T09:05:39+00:00″ />
<meta property=”og:updated_time” content=”2015-03-23T09:05:39+00:00″ />March 23, 2015 at 10:14 am #90322TomLead DeveloperLead Developer
Ah, well GeneratePress doesn’t add those tags.
Those may be added by your SEO plugin, or another plugin you have installed.
Deactivate each plugin one by one until it disappears. Then you’ll need to ask that plugin developer how to remove them.March 24, 2015 at 6:35 am #90863Andrey
Tom, sorry, that was my mistake to think it is solely the theme’s issue. I will try to ask in Yoast SEO support if it’s their fault. But so far I don’t see any option in Yoast SEO plugin to edit what kind of metadata exactly is on and how to disable some. Thanks again for looking into my problem!March 24, 2015 at 9:17 am #90914TomLead DeveloperLead Developer
One way to check without having to wait for support is to disable plugins one by one until the tags disappear.
That will at least tell you which plugin is adding them 🙂
- You must be logged in to reply to this topic.