[ad_1]
Hello @mevabien22,
Thank you so much for getting in touch.
Yes, we do have a PHP code for excluding URLs from the sitemap.
Here’s an example code on how to do it:add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ){ if($url == 'https://mywebsite.com/some-post/'){ return false; } return $url; }, 10, 3 );
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
