Yoast SEO
"Last Modified 1970-01-01 00:00" (2 posts)

  1. Phil C
    Posted 3 years ago #

    I've just noticed that one of the categories in my XML sitemap is set to Last Modified 1970-01-01 00:00.

    Has anyone else experienced this? I've tried disabling/enabling the XML sitemap and editing the contents of the categories.

    I noticed there is a similar post to this , but it is from a while ago and it remains unanswered.

    Example at http://www.chaiselongue.co.uk/sitemap_index.xml. It's the /product_tag-sitemap.xml sitemap (drawn from woocommerce).

    Any help appreciated! :)


  2. matczar
    Posted 2 years ago #

    I have same problem. One of my custom taxonomy has date "1970-01-01 00:00". There are some posts with terms from that taxonomy.

    In file /wordpress-seo/inc/class-sitemaps.php, there is a function build_root_map(). In line 274 there is code:

    // Retrieve the post_types that are registered to this taxonomy and then retrieve last modified date for all of those combined.
    // $taxobj = get_taxonomy( $tax );
    // $date   = $this->get_last_modified( $taxobj->object_type );

    We can at this point test if a variable $date is empty, and if yes, we can execute this code to solve the issue, but for some reason the author, commented this out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.