Site logo

Archived topic

How to remove 'hatom' structured data

5 replies · Started by James on June 22, 2020

Viewing posts 1–6 of 6

Dear Support,
How do I remove 'Hatom' structured data? I'm not sure why this is generated, it seems to be really basic data that interferes with more complex structured data plugins.

One problem is how it displays:

updated 23 June 2020, 00:27
published 23 June 2020, 00:05

Whereas my structured data plugin generates it in a much more comprehensive way (ie. with timezone and seconds).

datePublished 2020-06-23T00:05:36+01:00
dateModified 2020-06-23T00:27:25+01:00

I believe this is causing SEO issues such as the 'time preview' not coming up in Google. ie. When it says posted '8 minutes ago'.

I've narrowed this down to the theme, it still appears when all plugins are disabled with only the theme activated.

Please direct me on how I can disable this with custom development. I really cannot wait on this incase it is affecting the search results.

Thanks

Hi there,

by default GP outputs its time stamps like so:

<time class="updated" datetime="2020-06-23T13:01:31+00:00" itemprop="dateModified">June 23, 2020</time>
<time class="entry-date published" datetime="2020-06-04T15:43:32+00:00" itemprop="datePublished">June 4, 2020</time>

You can however filter its output to whatever you need using the generate_post_date_output filter

https://docs.generatepress.com/article/generate_post_date_output/

Hi David,
Thanks for your reply.

Where is 'hatom' being generated from in the structured data for each post?

It's showing the date / time as:

updated 23 June 2020, 00:27
published 23 June 2020, 00:05

I would like to either edit this or turn it off completely.

Hi there,

As of right now, the hatom stuff is generated using classes throughout the theme, which can't be removed without editing those files.

I'm working on a way to disable it just like you can with the schema microdata in 2.5.0.

For the time being, it shouldn't be interfering with anything - it's simply a collection of HTML classes. When it comes to your date not showing in search engine results, it's usually because Google needs there to be only one date in the markup. You can do that with this filter: https://docs.generatepress.com/article/generate_post_date_output/#only-show-updated-date

Hi Tom,
Thanks for the reply.

How long will it be until 2.5.0 is released?

Is there anything I can do with the files now to manually remove the date / time from hatom? Even if I had to do this after each update until 2.5.0 I would be willing to.

Thanks
Stephen

This archived topic is closed to new replies.