My Wordpress default category has 'news' category term. I created custom post type with name 'artist' and custom taxonomy named 'genre'. Now what I set in permalink section is below
custom structure - /news/%category%/%postname%/
because I want to open all my default post open with 'news' slug. I create page taxonomy-genre.php which lead to all post of genre taxonomy. let say genre taxonpmy has term 'afro-pop'. Now when I view the page it display all post of 'afro-pop' but problem is that it has url
http://localhost/mn2s-new/news/genre/afro-pop/
what I want is
http://localhost/mn2s-new/genre/afro-pop/
I want to remove that news slug for taxonomy-genre.php page. Please help me with this I am trying from 2 days but doesn't find any solution.
My Wordpress default category has 'news' category term. I created custom post type with name 'artist' and custom taxonomy named 'genre'. Now what I set in permalink section is below
custom structure - /news/%category%/%postname%/
because I want to open all my default post open with 'news' slug. I create page taxonomy-genre.php which lead to all post of genre taxonomy. let say genre taxonpmy has term 'afro-pop'. Now when I view the page it display all post of 'afro-pop' but problem is that it has url
http://localhost/mn2s-new/news/genre/afro-pop/
what I want is
http://localhost/mn2s-new/genre/afro-pop/
I want to remove that news slug for taxonomy-genre.php page. Please help me with this I am trying from 2 days but doesn't find any solution.
This is controlled by the with_front
argument in your taxonomy registration code:
register_taxonomy(
'genre',
'artist',
array(
'rewrite' => array(
'slug' => 'genre',
'with_front' => false, // don't prepend static prefix from post permalink
),
// your other args...
)
);