Cannot show custom tax in sitemap if custom post type not checked
-
Hi there
I have a peculiar situation where a custom post type is used only to add text boxes (let’s say updates) with no direct permalink to the content itself (because it’s very short, so no need to index that).
Updates are grouped into so called “live feeds”, which are just taxonomy terms.
So the CPT is public but no permalink exist, hence the need to index the content via term archive pages (which shows all the “updates” for the “live feeds”).
I’ve tried to enable the Live Feed sitemap in XML Sitemap > Taxonomies, but I couldn’t find it there.
So I noticed that it appears only if you check “Updates” in XML Sitemap > Post Types.
However, I do not want to add Updates in the sitemap, since the permalinks won’t work.
Luckily, I managed to find this trick:
- Check the CPT in XML Sitemap > Post Types
-
Check the Custom Taxonomy in XML Sitemap > Taxonomies
-
Now, go back to XML SItemap > Post Types
- Uncheck the CPT there!
With this workaround it seems that I can get the taxonomy term links in sitemap-index.xml -> sitemap-taxonomy-live-feeds.xml without the cpt-related sitemap being displayed. (btw tomorrow i’ll double check if it works, since it around 1AM here).
However, it would be great to remove this master->slave relation between post types and taxonomies, because it’s limiting.
Thanks!
- The topic ‘Cannot show custom tax in sitemap if custom post type not checked’ is closed to new replies.