I have a few custom post types whose default urls I would like to completely hide or disallow. So for example, I have a custom post type called organization, and the url without rewriting looks like this:
I have a fairly complicated and working rewrite structure in place that is a combination of the taxonomy tags and custom post type so that people can use urls like
etc, to get to the post in question. All that works fine. I just don't want anything to show up when one goes to the default URL. I started worrying about this when i noticed that generating XML sitemaps was somehow picking up the default. I want it gone gone gone, never found anywhere outside of my rewrite structure.
I THOUGHT I just figured this out with adding:
,'publicly_queryable' => false
to my register post type code. This does prevent those pages from loading at least, but it does NOTHING to solve the dreaded urls showing up in XML sitemaps.
I'm starting to wonder if I don't need to rewrite those default URLs to something else, but that would mean checking the url, doing a lookup, and then...returning just the first possible taxonomy tag??