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
- Can custom taxonomies be displayed inside of a custom meta box?
- Add custom field to the archive page?
- Display child taxonomy until the last child
- Best practices for complex taxonomies
- wp_get_object_terms – How can I order the resulting array by hierarchy?
- custom post type category page
- Advanced custom fields – taxonomy terms images [closed]
- WPML Translating a term/taxonomy programmatically
- Custom template for archive of a custom taxonomy
- Display Custom Post Type Taxonomy Child Categories and their Posts
- Extend & Search Native WordPress Image Galleries With Tags and Taxonomies?
- A way to query custom taxonomies by name
- Hierarchical Taxonomy Terms Select Menu Output with selected=”selected” Set
- Sorting Custom Posts on Archive page with pagination
- How to change url for taxonomy pages?
- Search Query for Multiple Terms In Same Taxonomy
- How to Modify Default Text in a Custom Taxonomy Admin Panel?
- Why isn’t the ‘no results’ being shown when a query returns no results?
- How to get_the_term_list() from multiple taxonomies?
- How to get custom post type categories in an array
- list custom taxonomy with count
- Displaying Posts Attached to Custom Taxonomy Terms
- Page for custom taxonomy
- Automatically tag posts based on user-defined words [closed]
- Custom rewrite url structure for several custom taxonomy (NOT pos_type)
- Print Custom Taxonomy Term Name
- is_tax is failing me and can’t figure out the solution
- Get user created Woocommerce attributes ( taxonomies ) [closed]
- Remove taxonomy menu without removing the metabox?
- Custom taxonomy list in Worpdress
- Complex Taxonomy scheme
- Display posts from specific slug of the custom taxonomy in WordPress
- Taxonomy term template is not working
- Registering custom taxonomy using reserved terms
- Show taxonomy term meta field on single template