When you register your taxonomy you can create the rewrite rule for the slug
register_taxonomy(‘investment_country’,array(‘investment’), array( ‘hierarchical’ => true, ‘labels’ => $labels, ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => array( ‘slug’ => ‘country’ ), ));
so whenever I’m showing something that I have included in the country taxonomy I get
http://www.domain.com/country/unitedkingdom for example
don’t forget you’ll need to resave your permalinks
Related Posts:
- Custom post type, no need for single view, plus want permalink rewrites that include hash in URI
- Using /%postname% for a custom post type
- Why would WordPress use ‘attachment’ in a custom post type’s query string?
- Custom post type URL with post ID that allows archiving and paging
- Changing the URL Structure of a Paginated Custom Post
- Custom post type taxonomies URL rewrite
- Enforcing canonical URLs with multiple custom post types
- Permalinks so that one custom post type appears to be a child of another, not working
- Create permalink structure for one taxonomy archive per custom post type
- Custom permalinks
- Issues when rewrite rules collide?
- Custom post type permalink changing itself every other change
- Prepend meta_value to permalink of post
- How to create custom URLs for Custom Post Type sub sections?
- Custom Permalinks for Custom Post Types and Taxonomies
- Rewrite custom post type url’s adding meta box values
- Custom Post Type Rewrite Rule for Author & Paging?
- Removing parent slug from URL on custom post type
- Multiple parameters in a custom post type url rewrite
- How to properly prefix blog post URL’s
- Custom post type category, taxonomy and URL rewrite problem
- Rewrite on custom post type permalink not working?
- Custom post-type in root directory, blog posts in subdirectory
- Custom Post Type/ Taxonomy URL rewrite
- Custom query variable – get wordpress to redirect to nice permalink url
- how to get archive urls with same origin for custom types and terms?
- Permalinks for Taxonomy and Custom Post Type
- Multisite with a single, shared custom post type, while retaining site URL
- Share parent path between Custom Post Types and Pages?
- multiple url slug for single custom post type
- Pretty URLs for Custom Post Type & Custom Taxonomy with Duplicate Slugs on WPML
- Rewrite URL for only archive page (custom post type)
- Remove base slug in permalinks of hierarchical custom post type
- Change custom post type slugs, with category/taxonomy before post type name
- Rewrite rules for custom posts types
- modrewrite not working on my Apache setup
- wp_list_categories() – current-cat class also inside posts?
- Custom Post Types, URL rewrite on multiple CPTs
- Adding custom post category slug in permalink causes 404 error for pages and posts
- How can I use get_post_meta with add_rewrite_rule to build custom permalinks?
- How can I make the slug of the taxonomy also the slug of the custom post
- Set a CPT slug as a base name for all the taxonomies
- Custom taxonomy rewrite with query var returns %2F in URL
- Remove slug in URL custom post type
- Versioned Custom Post Type (Not the same as revisions)
- cpt and page sharing same base permalink
- Custom post Type, child of a Page?
- Hide or disallow default custom post type url?
- URL rewriting for CTP assigned entity
- Custom taxonomy returns 404
- Added Custom Post Type and the View Option Doesn’t Work
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Pretty URLs and custom post types
- Permalink misbehaving in Custom Post Types
- Custom URLs in post types make it impossible to view archive
- Custom Permalinks for Custom Post Types
- Share root slug for Child Page and Custom Post Type (prioritizing child pages over posts)
- Route subpage to Custom Post Type
- Custom Post Type Category URL
- Add term slug in URL of custom post type details page
- Programmatically add custom field to post_name in a custom post type
- Custom Post Type Advanced Slug
- Rewrite permalink for multiple post types (CPT) with taxonomy term
- How to constrain the results to a specific post_type on tag archive page?
- Pagination for custom post types – url rewriting
- Modifying rewrite rules to use /category//
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- Custom rewrite rule takes place AFTER the generic category rule
- returning the currect URL for nested posts
- Adding /blog in front of single posts (only)
- multiple URLS for the same page
- 404 error rewrite permalinks
- Custom rewrite rule based on other custom post type title
- Define multiple prefixes for custom post type
- Custom Post Type parent/child relationship rewrite rules for permalinks
- Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?
- Custom Post Type canonical link / pagination redirecting to root
- Rewrite url post_tag for custom post type
- How to build overlapping custom post_type and taxonomy rewrites without conflicts?
- WordPress custom post type rewrite rule matches all pages returning 404
- Remove custom post type slug but keep related category taxonomy permalink
- page not found for example.com/custom-post-name
- Force WordPress to only match URL in category
- Custom post type with parent page? Possible?
- current_menu_parent for custom post type and custom url
- Why won’t this rewrite rule work?
- Cannot modify a registered custom post type rewrite slug
- Custom post type and custom taxonomy archive inaccessible
- Generating custom URL before post is published
- Custom post type permalink structure
- How can i change url structure of cpt like this?
- Custom Post & Taxonomy rewrite break regular post & page
- Rewrite Rule for custom post type link with or without taxonomy terms
- Rewrite nested urls for custom post type
- Custom post type Premalinks main page and details page
- Rewrite rule taxonomy url with different values in one function
- Custom URLs between different post types, using “Pods”
- CPT with URL rewrite showing as 404
- How to make a Custom Post Type entry to have different parent pages
- Rewrite taxonomy permalink appended to CPT archive url