[Plugin: Google XML Sitemaps] False DateTime in Sitemap-TOC
-
For the TOC (www.acme.com/sitemap.xml) the plugin uses the query:
SELECT YEAR(post_date_gmt) AS
year
,
MONTH(post_date_gmt) ASmonth
,
COUNT(ID) ASnumposts
,
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 DESCThis 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) ASmonth
,
COUNT(ID) ASnumposts
,
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 DESCArne, could you please change this?
https://www.ads-software.com/extend/plugins/google-sitemap-generator/
- The topic ‘[Plugin: Google XML Sitemaps] False DateTime in Sitemap-TOC’ is closed to new replies.