WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have multiple custom post types and custom taxonomies, "staff", "games", which have the permalinks:


However, I'm only using these custom posts to store data and am displaying it collectively on different pages. How do I get the paths, such as, /staff/%staff-name% to redirect to the 404 page?


share|improve this question

If you set the "rewrite" argument to "false" when registering the custom post type, no rewrite rules will be generated.

share|improve this answer
Additionally, if you don't want them to be queryable on public facing pages, you may also wish to set query_var to false, but note that doing so disables preview for that type - ie. preview post. – t31os Jan 26 '11 at 11:45
@t31os: Ha, that's interesting! But of course, if you only use the custom posts in other situations, the preview doesn't matter that much. Unless you create a special preview template that combines all these different situations. (But I think you need to play with template_include for that, there is no special template file name for previews?) – Jan Fabry Jan 26 '11 at 11:59
I don't think there's such a thing as a preview template, but it's interesting idea... templates for post previews. – t31os Jan 26 '11 at 12:07

Setting these posts as "private" should do what you want - (unless I misunderstood your question)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.