Change permalink custom post type category
-
Hi,
I’m really excited about the custom post type together with custom taxonomies. Still, having problems having the features play well together. Maybe someone can explain what I’m missing.
I’ve create a ‘Custom Post Type’ called Tips.
function post_type_tips() { register_post_type('blog_tips', array( 'label' => __('Tips'), 'singular_label' => __('Tip'), 'public' => true, 'menu_position' => 8, 'rewrite' => array('slug'=>'tips'), 'show_ui' => true ) ); }
Added some taxonomy (categories for the tips)
function post_type_tips_taxonomies() { register_taxonomy_for_object_type('category', 'blog_tips'); }
Creating tips attached to categories works very well and are really easy, but I want to create the following urls:
- https://localhost/blog/tips
- https://localhost/blog/tips/category
- https://localhost/blog/tips/category/post
The first page ‘tips’ is no problem. I can loop over the categories with the function ‘wp_list_categories’ but how can I change the URL of the categories? I can’t find a way to rewrite that url.
Hope someone can help. Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change permalink custom post type category’ is closed to new replies.