Custom Post Type Rewrite Permalink
-
Hi everyone!
I’m working with a premium theme in which was developed a plugin for custom post types. The site presents a listing of events and locations. I’d like to change the permalink structure for SEO purposes and maybe I’m not so experienced in coding to understand how to achieve my goal (if possible).This is the code for events categories:
register_taxonomy( 'event_cat', 'event', array( 'public'=>true, 'hierarchical' => true, 'labels'=> $labels, 'query_var' => 'event_cat', 'show_ui' => true, 'rewrite' => array( 'slug' => 'event_cat', 'with_front' => false ), ) );And this is the permalink output:
http://www.vadoper.it/demo/event_cat/concerto-dal-vivo/
I’d like to get rid of this “event_cat” (I was expecting to see it substituted by the category name, but this is appended after “event_cat” instead) just to have a simple permalink for categories like .Maybe I’m missing something about the theme architecture and, even for instructive purposes, I hope someone could help me understand more about these permalinks.
My try has been changing the “rewrite” code with
'rewrite' => array( 'slug' => '', 'with_front' => false ),
re-save permalinks (actually setted to /%postname%/) but it isn’t working..
Thank you!
The topic ‘Custom Post Type Rewrite Permalink’ is closed to new replies.