Yoast / wordpress-seo

Yoast SEO for WordPress

Home Page:https://yoast.com/wordpress/plugins/seo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The conditional tag article:published_time outputs for posts but not for pages

josevarghese opened this issue · comments

Issue moved from Jira: https://yoast.atlassian.net/browse/IM-774
Reporter: @michaelbriantina

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

Description
In our documentation here, we state that we output the article:published_time for both posts and pages.

When creating a new post, it outputs both the article:published_time and article:modified_time.

image-2020-11-13-16-16-05-639

However, when creating a new page, it doesn't output the article:published_time. It does output the article:modified_time though. Also, the datePublished and dateModified schema are also outputting accordingly.

image-2020-11-13-16-21-05-243

Is this a bug or do we just need to update our developer documentation for the article:published_time section?

Impact
This could potentially cause issues for any websites or crawlers that use the article:published_time conditional tag.
"The article:published_time doesn't output for pages which isn't in line with our documentation"

WP: 6.5.4
Yoast: 22.8

Please inform the customer of conversation # 787111 when this conversation has been closed.

Comments:
Jono Alderson (November 27, 2020 at 3:05 PM)

Some feedback that we also output article:modified_time (but not article:publish_time on custom post types).

To be clear, the documentation describes the correct behaviour.

On post and page post types, we should output both of these tags. On other post types, we should not output either tag (because we can’t reliably assume that these are appropriate for the content type).

Jannes (November 20, 2020, at 5:49 PM)
Reopened, additional info: https://yoast.slack.com/archives/CGUL0LDQS/p1605275018023000

Jono Alderson (November 20, 2020 at 2:18 PM)

@ Jannes Do we need to re-open this following our discussions?

Jannes November 13, 2020 at 6:20 PM

The published date is only shown on posts. The wpseo_opengraph_show_publish_date can be used to add additional posttypes to add the publish date to other posttypes.

I have proposed this change to the docs: https://github.com/Yoast/developer-docs/pull/107. Since there is a filter present, I assume this behavior is intentional, so I’m closing this report.

commented

It would also be nice to have author info as many pages are published on dates that are prior to competitors with better authors. Also the opengraph twitter and other stuff should be available at least for graphql

Came here to report this for https://yoportal.com/ Am facing same date issue. Thanks you already know.