Using /%postname% for a custom post type

You start with one bonus point for using my rewrite analyzer 🙂

Indeed, even if you use verbose page rules, since version 3.1 (or something around that) the taxonomy rewrite rules come even before that. I recently answered another question with a way to move them really to the top. This should work if you don’t mind having verbose page rules (if you don’t have more than 25 pages or so).

If you don’t want verbose page rules you will have to extend the core WP class so it can deal with “ambiguous” situations where the URL can refer to a page or a custom post type. Mike once provided a nice way to do this. His answer is written for a custom taxonomy, but it should be adaptable to a custom post type too.

Leave a Comment