Opened 3 months ago

Closed 3 months ago

#7410 closed enhancement (reported-upstream)

Show modified date in google results

Reported by: benniledl's profile benniledl Owned by:
Milestone: Priority: normal
Component: Developer Hub Keywords:


Show modified date in google results rather published date

Change History (6)

#1 @dd32
3 months ago

  • Keywords 2nd-opinion removed

I suspect this is google picking up the first <time> element on the page.

The sitemap is correct:

1227 2023-11-08T01:35:16Z

And the only place the 2014 date shows is:

$ curl -is | grep 2014
<div class="wp-block-post-date"><time datetime="2014-04-25T06:04:56+00:00">April 25, 2014</time></div>

If it's indeed using the <time> element, maybe we need to add a rel attribute or something to it, such that it picks up the right one.

$ curl -is | grep '<time'
<div class="wp-block-post-date"><time datetime="2014-04-25T06:04:56+00:00">April 25, 2014</time></div>
<div class="wp-block-post-date__modified-date wp-block-post-date"><time datetime="2023-11-08T01:35:16+00:00">November 8, 2023</time></div>

#2 @dd32
3 months ago

Likely easiest fix is adding Structured Data (<script type="application/ld+json">), see

@benniledl Would you be able to create an issue on the Github repo for Developer?

#3 @benniledl
3 months ago

Thanks for taking a look at this @dd32 !
I will create a issue on github :)

#4 @dd32
3 months ago

  • Resolution set to reported-upstream
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.