Adding filtering pages to the sitemap
-
Good day. Guys, please help me out. Using the Filter Everything plugin, I created optimized filter pages (example link)
https://teplospektr.com.ua/product-category/zapchastyny-po-brendam/ariston/brend-ariston/zapchastyny-ariston-datchyk-ntc-temperatury/
There are about 250-300 of them.
tried adding via this code:
add_filter('wpseo_sitemap_index', function () {
$links = [
'https://mysite.com/link1',
'https://mysite.com/link2',
'https://mysite.com/link3',
'https://mysite.com/link4',
'https://mysite.com/link5'
];
//also you can generate links by your own business logic
$appended_text = '';
foreach ($links as $l) {
$appended_text .= "<sitemap><loc>{$l}</loc></sitemap>";
}
return $appended_text;
});
are added under the list (screenshot 1), but in the end Google does not accept it and writes the Sitemap file is an HTML page.
Please tell me how to add 200-300 pages?.
Link to screenshot:
https://drive.google.com/file/d/1zE2ossEQsAL3gz9ClOcYFO92HFLD7Rco/view?usp=sharing
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.