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)
- How does WordPress manage to differentiate between post and page URLs without a distinct base, and how can I replicate this functionality?
- Rewrite taxonomy permalink appended to CPT archive url
- Query Custom Post Type Taxonomy term with multiple parameters
- Display post content with respect to its title?
- Hierarchy and access control for Custom Post Types (CPT)
- Auto Complete Search
- Custom Post Type Pagination Paginates Only in URL Structure
- Set post terms for multiple posts
- Post Type rewrite rule to point to custom Page/template
- Load Custom_post_type categories post with ajax
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Get terms that contain posts that in turn belong to other terms?
- Rewrite CPT child page URL to support query var
- WP-API select custom taxonomy when creating a post
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- First custom field value (out of several) displayed twice after query
- Custom post with more than one custom taxonomy
- How to get custom posts sub category link
- Custom while loop for hierarchical display of a taxonomy
- Terms showing up in object cache on unrelated pages
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Get the taxonomy of a post hierarchically
- Canonical url differs from custom post type archive URLs
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- Including taxonomy term before post type breaks top level pages
- Correct procedure for advanced permalinks
- Permalinks: custom post type -> custom taxonomy -> post
- Default post tab showing twice in admin bar
- List Taxonomy Terms based on another Taxonomy
- How to get the intersection of two terms both from different custom taxonomies
- CPT’s with landing page instead of archive – Url Rewrite?
- Template for all categories of a custom post type?
- How to change permalink to include custom post type
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- posttype/taxonomy/term archive page 404 error