Personally I would not recommend breaking the taxonomy archives – what if someone wants to browse all posts tagged “ferrari”?
You’re better off using the page URL in the first place:
if ( $tags = get_the_terms( $post, 'vehicle' ) ) {
foreach ( $tags as $tag ) {
if ( $_page = get_page_by_path( "cars/$tag->slug" ) )
printf( '<a href="https://wordpress.stackexchange.com/questions/198524/%s">%s</a>', get_permalink( $_page ), get_the_title( $_page ) );
}
}
Related Posts:
- custom taxonomy and pages rewrite slug conflict gives 404
- Remove taxonomy base or term from url
- Removing taxonomy base using WP rewrite
- Custom taxonomy on permalink
- Custom taxonomies, with custom rewrites/slug, AND loading a taxonomy archive template from a plugin
- URL rewrite rules for multiple taxonomies query
- Rewrite rule for custom taxonomy
- Nice URLs for a Custom Post Type List with a Shared Custom Taxonomy?
- How do I rewrite a url to use %taxonomy% instead of %category% when multiple taxonomies are present?
- Pros and cons of using [taxonomy name] in place of [category name]?
- How to include parent terms in hierarchical taxonomy URLs?
- WP redirects pretty permalink to query string
- Removing the base “Author” or changing it to something else. is it possible?
- Permalinks for quote authors
- Bulk 301 redirect for custom post type
- Sorting Posts Via Custom Taxonomy Values Using Checkboxes?
- How to redirect custom post type archive to first term of associated taxonomy?
- Add parent/child taxonomy to custom post type url
- Keep taxonomy base name in post permalinks
- Permalinks for custom taxonomy stopped to work
- Taxonomy with_front causes all
- 404 error- issues with pages after adding custom rules for posts
- How to overwrite registered taxonomy url from vendor plugin in child theme
- How Can I Change a Taxonomy URL Based On The Originating URL?
- How to add a Rewrite Rule / Category Structure
- Rewrite URL for taxonomy listing
- Custom permalinks with hierarchical taxonomy – getting PHP warning
- Change the permalink URL to include a taxonomy term
- Rewrite Rule Working for all but one of the taxonomies created
- Page and Post return 404 with custom taxonomy
- How to Rewrite Taxonomy URL to Include the Post Type as the Second Segment of the URL?
- Taxonomy Pagination Rewrite
- Redirect on saving term at custom taxnomy
- woocommerce custom product category template
- Add Taxonomy Subcategory To Permalink
- how to change permalinks format for pagination?
- Custom Taxonomy and Rewrite URL
- How do I create a permalink structure with 2 taxonomies
- Rewrite Rules returning wrong data
- Pagination on Custom Tax Pages Removes Spaces from Query Vars
- Taxonomy Rewrite Rules Redirecting Instead of Masking
- I don’t need ‘view’ page for my custom taxonomy
- How to rename custom taxonomy URL with extra words
- Custom URLs in Custom Search Results
- How to change url for taxonomy pages?
- Query custom taxonomy by term id?
- Custom Taxonomy specific to a Custom Post type – rewrite URL
- Permalink Problems
- Check If Taxonomy A and Taxonomy B has same Slug, 301 Auto Redirect Tax A to Tax B if True in WordPress
- How to add hierarchical taxonomy with parent child relation to URL?
- Custom taxonomy link automatically removing query string and re-directing
- Clean Custom URL for Serach + Custom Taxonomy
- Best way to redirect taxonomy terms to pages
- Custom rewrite permalink doesn’t work
- URL rewriting taxonomy term
- How can i fix a 404 error when targeting custom taxonomy slug ?
- Permalink issues with custom taxonomies
- Taxonomy URL rewrite whilst keeping filtered posts?
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- How can I rewrite the URL of my custom taxonomy to include the year?
- How to change Custom Permalink for Taxonomy? (remove the slashes from term-slug)
- How do I get the correct URL?
- How to structure all custom-taxonomy with three verbs(a,b,c) and route them accordingly?
- Rewriting url for multiple Taxonomies and Custom Post Type
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- Custom rewrite url structure for several custom taxonomy (NOT pos_type)
- Remove taxonomy name and add .html extension in the custom taxonomy term URL
- How to paginate with an query var appended to permalink?
- Hierarchical taxonomies in permalink cause 404 for sub term archive
- Permalinks incorrectly inserting multiple categories
- Permalink structure not working with Custom Taxonomy (URL like ./taxonomy/category/postname)
- add_rewrite_rule using custom taxonomy and year
- Need help understanding a rewrite with multi-level taxonomy
- If term and page have the same slug, how can I view the term archive?
- Taxonomy to WordPress Permalinks of custom post type
- Multiple Taxonomy in URL/Query – No Custom Post Type
- Creating a page for custom taxonomy archive
- Custom Taxonomy Archive URL rewrite
- Later change of taxonomy slug base not changing permalink
- Rewrite URL for a specific taxonomy [duplicate]
- get_terms – only top level
- Order get_terms using a Custom Field
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- Landing in 404 Page on Navigating to Custom Taxonomy Archive
- Get main term from a sub term in Woocommerce
- Current category link filter
- Some custom taxonomy child terms not showing in admin. Caching problem?
- Custom Taxonomy Query
- Pass taxanomy parameters to next_post_link()?
- Taxonomy in URL
- List Top 5 taxonomy terms based on number of post
- List custom taxonomies associated to an author’s posts
- qtranslate-x problem with custom term description
- Custom Tax Archive of Parents Only?
- Looking for suggestions on creating simple database (Help!!)
- Custom taxonomy – query returns an error
- Getting grandchildren of a post with a specified custom taxonomy?
- Taxonomy Parameters in WP Query to get posts from two different taxonomies
- Update fields with post object and custom tax with wp_insert_post
- post_type_link not working for posts without terms