{"id":4485090,"date":"2014-01-09T08:31:37","date_gmt":"2014-01-09T08:31:37","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-posts-dont-show-on-xml-sitemap\/"},"modified":"2016-08-21T14:33:59","modified_gmt":"2016-08-21T14:33:59","slug":"custom-posts-dont-show-on-xml-sitemap","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-posts-dont-show-on-xml-sitemap\/","title":{"rendered":"Custom Posts Dont show on xml sitemap"},"content":{"rendered":"<p>Hello,<\/p>\n<p>I have a custom post type &#8216;exam&#8217; which works fine throughout the site.<br \/>\nOn my sitemap_index.xml generated by the yoast plugin, the sitemap sitemap-exam.xml is listed successfully along with all the other sub xml sitemap files relating to each post type etc. The problem is that rather than containing a list of all exam post types published on my site, the sitemap-exam.xml file only contains one link to www.ieltsmanchester.co.uk\/ielts-exam-practice\/%exam_category%\/ rather than a list of all exam post type URLs. I have the rewrite rule &#8216;rewrite&#8217; =&gt; array(&#8216;slug&#8217; =&gt; &#8216;ielts-exam-practice\/%exam_category%&#8217;, &#8216;with_front&#8217; =&gt; false) applied in the register_post_type function which i use in a post_type_link filter to replace that portion of the url with a custom taxonomy I use to assigne each exam to an exam category. I had thought the problem may have been related to this but I&#8217;ve also set up a basic custom post type named &#8216;test&#8217; and the same problem arises. I have checked config numerous times and there doesn&#8217;t appear to be any reason why the exam (or test posts) shouldn&#8217;t be getting listed.<\/p>\n<p>Any thoughts?<\/p>\n<p>Thanks<\/p>\n<p>https:\/\/wordpress.org\/plugins\/wordpress-seo\/<\/p>\n","protected":false},"template":"","class_list":["post-4485090","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4485090","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\/4485090\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4485090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}