My Permalinks are the std %postname%. I have several custom post types, eg. 'docs'.
function docs_init() {
// create a new taxonomy
register_taxonomy(
'docs_tax',
'docs',
array(
'label' => __( 'Documentation_Tax' ),
'sort' => true,
'args' => array( 'orderby' => 'term_order' ),
'rewrite' => array( 'slug' => 'docs' )
)
);
}
I would like to be able to have duplicate slugs. Eg. I'd like to have a general Page with the slug 'MyPage' and then a Docs post type also with the slug 'MyPage'. The goal is to have users be able to do this:
URL: mysite.com/mypage ---- general Page
URL: mysite.com/docs/mypage ---- posttype Docs
...and this does not work. If the user types /docs/mypage, the browser redirects to /mypage ...even though in the post editor it shows that /docs/mypage is the URL.
I thought that since 'with_front' defaults to true, WordPress would distinguish between the two slugs by assigning the 'front' (ie. the post type.)
How can I get what I want... or is it simply mandatory to have unique slugs?
TIA,
---JC