I have a custom post type registered called Resource
:
$args = array(
'public' => true,
'publicly_queryable' => true,
'capability_type' => 'post',
'hierarchical' => false,
'supports' => array('title', 'thumbnail'),
'register_meta_box_cb' => null,
'taxonomies' => array(),
'has_archive' => false,
'rewrite' => array('slug' => 'resources'),
//'rewrite' => array('slug' => 'resources/%term%'),
//'cptp_permalink_structure' => '%term%',
'query_var' => true,
'can_export' => true
);
register_post_type('resource', $args);
I have these sub-categories under Resource
:
Name Slug
---------------------
eBooks ebook
Brochures brochure
Podcasts podcasts
My question is, the post under Resource
will have permalink like:
I want to change the url structure to become:
I use the plugin Custom Post Type Permalinks, in the setting page, I confuse how to use the %slug%
before /%postname%
, so that the permalink will looks like above samples
I need someone to guide me how can I achieve this.
Thanks.