Reputation: 21
Is there any way to remove the "Project" term from the below permalink/url? www.fourmanteam.com/project/camping
I want the url in below order. www.fourmanteam.com/camping
I tried the custom structure. But, no help.
Thanks.
Upvotes: 0
Views: 72
Reputation: 21691
I assume that, "Project" is your custom taxonomy.
So while registering your taxonomy you need to pass following rewrite rule:
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array( 'slug' => '/' ),
);
register_taxonomy( 'Project', array( [custom_post_type_slug] ), $args, array( 'rewrite' => array ('slug'=>'/')));
After applying this code, you need to flush rewrite rules. For that you just need to save permalink setting again.
Upvotes: 1
Reputation: 4008
You may want to consider using a Redirection plugin (or other similar). It won't change the permalink itself, but at least it will allow you to have a shorter link to the category page.
Upvotes: 0