I seem to have hit a brick wall here. We are building a new wordpress website and the permalink structure is '/labs/%postname%/'. This works fine for all posts, using /labs/ as the base. Our issue is that we need a custom post type for our portfolio, where my base url should really be /work, then probably /work/digital, /work/cgi and so on. I created the custom post type and the taxonomy as well, but no matter what i do, the url for all my custom posts begin with /labs/.
I tried loads of suggestions, from rewriting rules to changing the rewrite parameter in the register_taxonomy function. The code i am using is below:
function create_post_type() {
register_post_type( 'our_work',
array(
'labels' => array(
'name' => __( 'Work Items' ),
'singular_name' => __( 'Work Item' )
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'work'),
'supports' => array(
'title',
'editor',
'excerpt',
'custom-fields',
'revisions',
'thumbnail',
'page-attributes'
),
)
);
}
add_action( 'init', 'create_post_type' );
function create_taxonomies() {
register_taxonomy('work-categories', array('our_work'), array(
'labels' => array(
'name' => 'Work Categories'
),
'show_ui' => true,
'show_tagcloud' => false,
'rewrite' => true,
'hierarchical' => true,
'with_front' => false
));
}
add_action('init', 'create_taxonomies');
Have tried to change the rewrite parameter to true, false, hierarchical and even replace it with / or the name of the custom post type..
Is it even possible to do that? All we essentially want to do here is have the blog and custom posts sit under 2 different base paths, i would think this would be easy enough to do!
sorry if this was covered before, the terminology is mixed up and search results bring up anything really remote to this matter.
Thanks!