Support Forum
Hi all,
I use the simple:press Google-XML-Sitemap plugin (in combination with Yoast Wordpress SEO plugin).
At the Google Webmaster tools I get an error because of the date-format.
It`s not e.g. "2015-02-23 12:29" but "1424696380".
You can see the problem here:
http://vogel-beobachtung.de/si....._index.xml
Has anybody an idea how to change this?
Thank you very much, Kalle
Yes, also Yoast is the newest version.
A weird thing is:
If I have a look at: http://vogel-beobachtung.de/si....._index.xml
...the time format is in the "wrong" format, but if I visite:
http://vogel-beobachtung.de/fo.....itemap.xml
..the format is well. Might that be a bug?
Best regards, Kalle
I am sorry to say that our Google Sitemap, SEO and Yoast team member is on vacation at the moment so I am ill-equipped to know. I am going to find the thread that raised the date issue in the first place to see if there is any information that might help. Will post back in a little while.
YELLOW
SWORDFISH
|
here is the thread: https://simple-press.com/suppo.....te-format/
I don't know if that helps but does it sound like a similar issue? The latest code you are using does have this change in it.
YELLOW
SWORDFISH
|
HI Yellow Swordfish,
thank you very much. That was a good help.
I changed:
function sp_google_sitemap_do_generate_yoast_main() {
$map = '';
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
$date = spdb_table(SFPOSTS, '', 'UNIX_TIMESTAMP(post_date)', 'post_date DESC', '1');
$map.= '<sitemap>'."
";
$map.= '<loc>'.home_url($base.'forum-sitemap.xml').'</loc>'."
";
$map.= '<lastmod>'.date($date).' </lastmod>'."
";
$map.= '</sitemap>' . "
";
return $map;
}
Into:
function sp_google_sitemap_do_generate_yoast_main() {
$map = '';
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : '';
$date = spdb_table(SFPOSTS, '', 'UNIX_TIMESTAMP(post_date)', 'post_date DESC', '1');
$map.= '<sitemap>'."
";
$map.= '<loc>'.home_url($base.'forum-sitemap.xml').'</loc>'."
";
$map.= '<lastmod>'.htmlspecialchars(date('c', $date)).'</lastmod>'."
";
$map.= '</sitemap>' . "
";
return $map;
}
...now it works
odd.. at first blush (and just back from 2 week cruise!), not sure why the change would be needed...
but will investigate it...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)