{"id":15877914,"date":"2022-08-01T14:52:27","date_gmt":"2022-08-01T14:52:27","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/programatically-adding-urls-to-xml-sitemap\/"},"modified":"2022-08-01T14:52:27","modified_gmt":"2022-08-01T14:52:27","slug":"programatically-adding-urls-to-xml-sitemap","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/programatically-adding-urls-to-xml-sitemap\/","title":{"rendered":"Programatically adding URLs to XML sitemap"},"content":{"rendered":"<p>Hi there,<\/p>\n<p>I have a need to add a number of URLs to the AIOSEO generated sitemap for a site I&#8217;m working on. These are valid URLs on the site the sitemap is for, however, they are not of a post type, and instead use a custom URL rewriting scheme, developed using add_rewrite rule, and get_query_var. I can generate a list of said URLs, I can supply priority, frequency, and last updated values for each URL, I just can&#8217;t figure out how to inject these into the AIOSEO sitemap.<\/p>\n<p>The CSV import option suggested in the docs is not feasible here, as I need it to be dynamic.<\/p>\n<p>Any help that could be provided would be greatly appreciated, thanks!<\/p>\n","protected":false},"template":"","class_list":["post-15877914","topic","type-topic","status-publish","hentry","topic-tag-sitemap"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15877914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15877914\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15877914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}