Forums

Google XML Sitemaps
False DateTime in Sitemap-TOC (1 post)

  1. Mr. NiceGuy
    Member
    Posted 8 months ago #

    For the TOC (www.acme.com/sitemap.xml) the plugin uses the query:

    SELECT YEAR(post_date_gmt) AS year,
    MONTH(post_date_gmt) AS month,
    COUNT(ID) AS numposts,
    MAX(post_date_gmt) as last_mod
    FROM mswar_2_posts
    WHERE 1=1
    AND (mswar_2_posts.post_password = '')
    AND mswar_2_posts.post_type = 'post'
    AND (mswar_2_posts.post_status = 'publish')
    GROUP BY YEAR(post_date_gmt), MONTH(post_date_gmt) ORDER BY mswar_2_posts.post_date DESC

    This query is not correct. When updating posts the query always displays the max create date of the posts within the month.
    To show the correct last modified date the query should be:

    SELECT YEAR(post_date_gmt) AS year,
    MONTH(post_date_gmt) AS month,
    COUNT(ID) AS numposts,
    MAX(post_modified_gmt) as last_mod
    FROM mswar_2_posts
    WHERE 1=1
    AND (mswar_2_posts.post_password = '')
    AND mswar_2_posts.post_type = 'post'
    AND (mswar_2_posts.post_status = 'publish')
    GROUP BY YEAR(post_date_gmt), MONTH(post_date_gmt) ORDER BY mswar_2_posts.post_date DESC

    Arne, could you please change this?

    http://wordpress.org/extend/plugins/google-sitemap-generator/

Reply

You must log in to post.

About this Plugin

About this Topic