Change the Custom Taxonomy URL Slug pattern

After reading through about 20+ post on here, this is what I have come up with… In this example http://test.com/{custom-post-type}/tag/{custom_taxonomy_name}/ or http://test.com/book/tag/css/ Would do the trick I am after. //http://test.com/book/tag/css/ function custom_taxonomies_rewrite(){ add_rewrite_rule(‘^book/tag/([^/]*)/?’,’index.php?book_tag=$matches[1]’,’top’); } add_action(‘init’,’custom_taxonomies_rewrite’); I am not sure on the best way to call this though, right now it is called with init action. … Read more

Copying taxonomy term to custom field

Try hooking into ‘save_post’ action: add_action( ‘save_post’, ‘your_state_term_save’ ); function your_state_term_save( $post_id ){ // Bail if we’re doing an auto save if( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) return; //check if they selected your state term $state = isset($_POST[‘tax_input_field_name’]) ? $_POST[‘tax_input_field_name’] : ”; //make sure of what the input name is here… //insert post meta … Read more

Ordering values entered in Custom Taxonomies

To print its categories that article uses the function wp_list_categories. The parameter that dictates how elements are ordered is “order_by” which it sets to “name”. Other options are listed under parameters, order by, on that function’s page in the codex: http://codex.wordpress.org/Template_Tags/wp_list_categories It seems that the option you have are ID, name, slug, term_group and count. … Read more

Taxonomy in URL

Following the steps below will make your permalinks look like: www.mydomain.com/videos(Category)/the-video(Post) Visit the Settings > Permalinks page of your WordPress administration dashboard. Select the Custom Structure option, and enter this value: /%category%/%postname%/ Click Save Changes There currently is no way (that I know of) to include the taxonomy in the permalink. One way around this … Read more