-
Hi,
I am trying to add some external URLs to the existing sitemap. Also tried to create one sitemap file with those external URLs and then tried to add that sitemap file to RankMAth sitemap.
For these purposes, I have created rank-math.php.
Then tried with these below functions –
add_filter( ‘rank_math/sitemap/index’, function( $xml ) {
$xml .= ‘
<sitemap>
<loc>https://maximbetdev.wpengine.com/maximbet-sportsbook.xml</loc>
<lastmod>2021-09-17T20:34:15+00:00</lastmod>
</sitemap>’;
return $xml;
}, 11 );add_action( ‘rank_math/sitemap/page_content’, function() {
return ‘<url>
<loc>https://maximbet.com/sportsbook</loc>
<lastmod>2021-09-17T20:20:20+00:00</lastmod>
</url>’;
});But nothing is happening. No extra URL is coming in this site map – https://maximbetdev.wpengine.com/sitemap_index.xml
Please help me, it’s urgent.
Thanks,
Ayan
The ticket ‘add external Sitemap/URL to the Rank Math Sitemap’ is closed to new replies.