• Resolved Jules Colle

    (@jules-colle)


    Hi,

    If I inspect the source code I find this line:

    
    <meta property="article:modified_time" content="2020-12-10T13:59:50+00:00" />
    

    But there is no line with article:published_time. Any idea why this might happen? Are there any settings or wp-hooks I should be looking for that might be responsible for this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support devnihil

    (@devnihil)

    @jules-colle Can you please let us know whether the page where you are experiencing this issue is a post, or a page?

    The?article:published_time?tag is only output on posts, not on pages. So if where you are experiencing this is on page, this is expected behavior.

    If you want the?article:published_time?tag to be generated for other post types, you’ll need to implement the?wpseo_opengraph_show_publish_date?filter.

    For example, the code snippet below added to the functions.php of your theme will make Yoast SEO output the?article:published_time?tag in all your post types.

    add_filter('wpseo_opengraph_show_publish_date', '__return_true');

    Thread Starter Jules Colle

    (@jules-colle)

    That’s probably it! It happens on custom post types. Will try it out.

    Maybe there is also something I can do while registering the post type, that tells yoast it is post-like?

    @jules-colle

    Adding the aforementioned snippet would tell Yoast SEO to output the article:published_time tag for your custom post type posts like default post.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘yoast is showing article:modified_time but not article:published_time’ is closed to new replies.