Additional url.xml to sitemap index
-
Hi,
until the v4.1.13 the additional url, that i added using the code below, works fine. It added the url to the sitemap index (it was like this https://mysite.test/api/sitemap-places.xml) and inside of it the list of other urls added with add_url. Now, from v4.1.14 to v4.1.20 using the same code below, it adds the url as https://mysite.test/api/places.xml and once opened i get 404 not found. I saw your documentation and i also tried to use the add_filter(‘sm_sitemap_index’ ,….) but nothing changed.
Ty
function addToIndex($sitemapGenerator){
? ? $sitemapGenerator->add_sitemap("places", null, current_time( 'timestamp'));
}
function addToPlaces($sitemapGenerator, $type){
? ? if($type <> 'places'){
? ? ? ? return;
? ? }
? ? $sitemapGenerator->add_url(
...
? ? );
}add_action('sm_build_index', 'addToIndex', 1, 1);
add_action('sm_build_content', 'addBpmBranchesToSitemap', 1, 2);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.