I've got a site with a very large number of custom taxonomies. The site uses FacetWP to allow uses to drill down through those taxonomies. Instead of sending users to taxonomy-{taxonomy}.php when they click a linked term/taxonomy, I'd like to send them to the search with that specific facet applied. FacetWP makes this very easy with query strings.

It seems silly to use wp_redirect() and have 301 redirects for hundreds and hundreds of items. Is there an easier way to programmatically replace what Wordpress considers the destination for term and taxonomy archives?

1 Answer 1


I'm not familiar with how FacetWP displays search results, but if it's using the default (or a custom) search.php template, you could use a template filter to hijack the default hierarchy. See the Filter Hierarchy section of the Template Hierarchy page for examples. If you want more specific help update your question to show how you'd do this via wp_redirect() and we can help switching out the method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.