Problems with Rewriting the Slug for Taxonomies
-
I’ve been experimenting with custom taxonomies. The code seems to work for the most part, but the part to rewrite the slug isn’t working. Here is my code:
function build_taxonomies() { register_taxonomy('projects', 'post', array( 'label' => __( 'Projects' ), 'sort' => true, 'args' => array( 'orderby' => 'term_order' ), 'rewrite' => array( 'slug' => 'project' ) ) ); } add_action('init', 'build_taxonomies');
Based on the Codex, it sounds like the rewrite slug part should make it so I can type “mydomain.com/?project=project_tag_goes_here”, but that doesn’t seem to work. Using plural form works fine: “…?projects=project_tag…”.
Note that I tried flushing the rewrite rules. I tried resaving my Permalink Settings and using $wp_rewrite->flush_rules() as described here:
http://codex.wordpress.org/Function_Reference/register_taxonomy
- The topic ‘Problems with Rewriting the Slug for Taxonomies’ is closed to new replies.