Rewriting slug for custom category points to attachment instead of category
-
Hello and thanks for looking at my question,
I’m having trouble with rewriting permalinks for a custom post type taxonomy.
https://mysite.local/section/subsection/category/test/page/1/ points to the correct template. This is index.php?custom_category=test
https://mysite.local/section/subsection/category/test/ – without the ‘page/1/’ – points to the 404 page. This is because its redirected ultimately to index.php?attachment=test
register_taxonomy(‘custom_category’,’custom_post_type’,array(‘label’=>’Category’,
‘labels’=>array(‘name’=>’Categories’,’singular_name’=>’Category’),
‘rewrite’=>array(‘slug’=>’section/subsection/category’,’with_front’=>false),
//’query_var’=>true,
‘hierarchical’=>false));I’m thinking this has to do with the order I’ve registered my custom taxonomies in? Though I have other custom categories for different custom post types, ex: custom_events, that works just fine.
I’d greatly appreciate your feedback on similar experience.
Thanks!
Brittney
- The topic ‘Rewriting slug for custom category points to attachment instead of category’ is closed to new replies.