Replacing term/taxonomy archive pages with search queries
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?
Leave an answer