I am searching for a way to "detect" in which sitemap a post is located in but I cannot find any solution to this problem, nor does any SEO plugin or Cache plugin provide any way or wrapper function to return this?
Essentially I'm looking for a function that takes a $post_id or a $post object and can return a sitemap URL in which that post is located or an array of sitemaps (if it shows up in multiple sitemaps).
Any help is greatly appreciated.
wp-sitemap-posts-post-{page-number}.xml
. Probably no pretty/easy general solutions here to find it: loop alot, cache alot, fetch and parse alot or dig alot into SQL, choose one :-)