I added this to my child-theme’s functions.php file and it works 100%
add_action( 'template_redirect', 'redirect_archive' );
function redirect_archive() {
if ( is_tax('location') ) {
$termurl = get_query_var( 'term' );
wp_redirect( home_url('/search/location/'.$termurl), 301 );
exit;
}
}
Related Posts:
- Why is the custom taxonomy archive page redirecting me to a single post? [closed]
- Custom Taxonomy index/archive hierarchy
- How to create a completely functioning separate archive for posts from only 1 or 2 specific categories
- Custom taxonomy return 404
- Include and Exclude Taxonomies From Archives & Feeds Using ‘pre_get_posts’
- Check if current term is a child of another term
- How to hide custom taxonomy archives same way as hiding custom post types?
- Archive template for taxonomy terms
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Page queried instead of a custom taxonomy
- Landing in 404 Page on Navigating to Custom Taxonomy Archive
- Using a different template per Custom Taxonomies for single term archive pages
- get_terms in a taxonomy template
- Creating an Archive using a Custom Taxonomy
- Custom Taxonomy Archive BUG
- Display direct children of the current custom taxonomy in taxonomy.php template
- Date archive permalinks for custom taxonomy
- Taxonomy archive showing no results
- Dynamic loading of Archive content based on custom taxonomy term name
- List taxonomies according to whether this post is in another taxonomy in taxonomy archive
- orderby meta_value breaks taxonomy term archives
- How to have two different versions of a tag/category/taxonomy archive page?
- Automatically Give All Custom Post Types a Pre-Set Category [duplicate]
- How to add Post Format Taxonomy Archive page in the menu?
- How does WordPress Parent-Child Taxonomy actually Works?
- Custom taxonomy archive shows 404 error
- Filter custom taxonomy archive posts by 2nd custom taxonomy using select dropdown
- Custom Taxonomy Term Archive Page Template that Filters 2 or more Taxonomies
- How to use multiple archive templates for a taxonomy?
- how does the wordpress rest API work
- How to customize taxonomy archive template files for subterms?
- How to create a custom template for custom taxonomy wp-tag-cloud?
- Taxonomy archive template that shows posts from more than one taxonomy
- Custom Taxonomy List with Children
- why the archive of custom taxonomy term shows nothing?
- Need equivalent of single_term_slug
- Can I output a custom taxonomy as a submenu in the site navigation menu?
- Add terms to a taxonomy archive from within the same taxonomy
- Custom Taxonomies Archive Page 404
- Template taxonomy-{taxonomy}.php doesn’t show my posts
- How to create archive pages for metadata query generated posts (so without taxonomy)?
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Hierarchical taxonomies in permalink cause 404 for sub term archive
- How to get a terms and posts associated with another term?
- Change the Page Title of the Archive Page for Portfolio Tags
- What’s the url queryvar for a taxnomy archive?
- Multi level archive
- Custom Taxonomy Archives Page Errors
- index.php Not Showing Custom Posts / Terms
- Custom Taxonomy Archive Page for Parents AND Children?
- Creating a Taxonomy Page [duplicate]
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Exclude 2 in 3 terms of A Taxonomy from all Archives
- Insert code on specific taxonomy archives
- Permalinks not working on MU network with domain mapping
- Using post type archive page for taxonomy archive
- Custom Taxonomy Archive URL rewrite
- Can you orderby slug in a taxonomy archive page using WP_Query?
- More than one Hierarchical Taxonomy and SEO
- Getting Catategory / Taxonomy Description on Non-archive Pages
- Taxonomies starting with a hyphen (minus) to assign B.C. dates to a post
- Custom taxonomy archive empty
- Add custom display condition to Elementor Theme Builder for custom taxonomy children, grandchildren, and great-grandchildren
- Why my archive title isn’t showing?
- Creating a custom archive page for WooCommerce products based on tags
- How to return custom taxonomy term in title for archive?
- Check if Current Category has Children
- How to assign multiple roles for capabilities array withini register_taxonomy function?
- Determine Term depth
- Programatically inserting terms doesn’t update the Taxonomy admin UI
- wp_insert_term auto unique name
- search query within custom taxonomy term, post title and meta field
- The same slug in multiple taxonomies
- Display the taxonomy name of the current term
- Advanced Tax Query
- Last posts from custom taxonomy
- How to add a body class based on a custom taxonomy term
- Search by type posts and taxonomy
- Get Taxonmy Term ID For Current Post
- Can I limit term selection to one plus parent?
- Taxonomy with_front causes all
- Why is my taxonomy template not shown?
- cannot get multiple loops using tax_query
- How to add a Rewrite Rule / Category Structure
- Hide posts having children terms when display posts by category in edit.php
- List of users inside custom taxonomy
- Weekdays as terms – How to order taxonomy terms by ID in admin panel?
- How to display ACF taxonomy checkbox links on WooCommerce product category archive
- How to show post for a particular term of custom taxonomy?
- How to list terms by first letter, as in A’s then B’s etc
- Taxonomy hide not working
- Create new Taxonomy, add extra fields, register terms AND extra fields values?
- How to change custom categories term links?
- Body class to each level of a hierarchical custom taxonomy
- How to Completely Remove Archive Title a.k.a the_archive_title?
- How to limit custom post category
- Show portfolio category slug in url ( if exist)
- How to include child terms within parent?
- Get taxonomy image for Toolset custom taxonomy through Toolset Views Shortcode
- Only display top level taxonomy on the edit post page with option to expand sub-categories