When you are adding a custom taxonomy you are able to declare a rewrite slug –
$labels = array(
'name' => _x('Name', 'taxonomy general name'),
'singular_name' => _x('Singular Name', 'taxonomy singular name'),
'search_items' => __('Search Items'),
'all_items' => __('All Names'),
'parent_item' => __('Parent Item'),
'parent_item_colon' => __( 'Parent Ites:'),
'edit_item' => __('Edit Item'),
'update_item' => __('Update Item'),
'add_new_item' => __('Add New Item'),
'new_item_name' => __('New Item Name'),
);
register_taxonomy(
'ad_category',
array('post-type1', 'post-type2'),
array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'query_var' => true,
'rewrite' => array('slug' =>'new-york-city')
)
);
Related Posts:
- Custom Post Type Permalink / Rewrite not working immediately
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- How to modify URL structures in custom post types and taxonomies or terms
- Archive page with multiple taxonomies rewrite
- Help with a TV series Rewrite structure
- Taxonomy archives based on Custom Post Type
- WordPress Custom Post Type Category Page
- Permalink rewrite with custom post type and custom taxonomy
- How to check if last uri segment is a custom post type or taxonomy term?
- WP Rewrite Rules – Custom post type & taxonomy
- Need help with complex custom post type setup
- Remove base slug in CPT & CT, use CT in permalink
- Custom Permalink Tag breaks Pagination
- Custom Permalink for Taxonimie and Custom Post Type
- how to get archive urls with same origin for custom types and terms?
- Adding the taxonomy before the custom post type
- Add hierarchical taxonomy to permalink for custom post type
- Permalink Structure CPT With Custom Taxonomy Fails
- Parent & Child Taxonomy slugs in custom post permalink
- Remove url rewrites for registered taxonomies
- Customize Custom Post Type URL
- How do I change the custom taxonomy slug to be the same as the custom post type slug?
- Custom taxonomy rewrite with query var returns %2F in URL
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- Custom Permalinks with CPT and Hierarchical Taxonomies
- How to get list of taxonomy slugs ordered parents>childs?
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Get url.com/post_type/taxonomy/term work!
- Different rewrite rules for taxonomies and cp in multisite?
- How to add custom taxonomy in custom post type permalink?
- Properly flush rewrite rules on plugin activation
- SEO Concerns With Rewrite Rules
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- WordPress custom permalink and archive link for custom post type
- How to rewrite the post slug of a custom post type post
- Modifying rewrite rules to use /category//
- WordPress custom taxonomy page
- rewrite rules hierarchical
- Custom taxonomy and post type rewrite rules
- Remove cpt slug from url and use custom taxonomy instead breaks all other cpt
- How to properly set the rewrite rules for this case?
- Change CPT permalink to use the category
- How to fix 404 on post after prepending Custom Post Type url with Custom Taxonomy Term slug
- Redirect Custom Post Type from Child Taxonomies
- How to build overlapping custom post_type and taxonomy rewrites without conflicts?
- Custom taxonomy archive slug overwrites static page
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- Group based routing and administration
- Adding Custom Taxonomy Along-with Post Name in Post Type Permalink
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Custom Post Type rewrite url to /category/pagetitle [duplicate]
- page not found for example.com/custom-post-name
- Rewrite for custom type and custom taxonomy
- redirect old post type url to new structure url
- Why won’t this rewrite rule work?
- Parent cpt/child custom post type URL permalink relationship
- Adding rewrite rules to Custom Post-type mixed with Taxonomy
- Custom Taxonomy in Permalink from post type
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Url rewrite with custom post type and taxonomy
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- Two Permalinks with one Taxonomy (custom taxonomy) and (custom post type -> custom taxonomy)
- Taxonomy, Terms, and Template Files
- Adding meta values to permalink
- Changing the priority of a custom taxonomy’s metabox
- How to list all categories and tags in a page?
- Many to Many Taxonomies or rewrite rules?
- How to display the rest of categories on Portfolio filterable
- How to query custom post type by term?
- How to get the first term for the current taxonomy?
- Add Tags to custom post type
- Custom page template for category taxonomy
- WordPress as Wishlist Application
- get_object_taxonomies() returns empty array for custom post type
- Display all posts in main category and 1 subcategory
- How can I see a list of my Custom Post Types of the last term I was in?
- Can’t get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together
- Custom taxonomy rewrite give pagination 404
- Rewrite rule for Custom post type Monthly and Yearly archive
- Custom post type’s extra fields – how to handle?
- Custom Post Types not queried in Custom Taxonomy archives or Native archives
- Show current custom taxonomy
- Custom post type specific category box
- Making a form for user to add new custom post with custom taxonomies and custom fields
- custom post type or taxonomy, which approach is better?
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- Basic CPT Question About Categories
- custom post type and a “sticky” position taxonomy
- Ajax load more inside custom post type taxonomy
- How can I get the last 5 element of this tax query?
- Create a custom wp_query from a specific custom post type with specific taxonomy
- Show posts for current taxonomy
- WordPress get all post with like in terms [duplicate]
- Cannot retrieve Custom Taxonomies (Disappeared)
- Custom Post type and Taxonomy in post URL error
- Loop multiple taxonomy in custom post
- Multiple Custom Post Type permalink issue
- How to Create Custom Post Type with Multiple Color Options?
- Get all active posts that are tied to a custom taxonomy for a custom post type