Search results show results of all taxonomies
-
Hi,
I have the following issue. I work with a lot of taxonomies.
For the taxonomy country and region I have taxonomy archives.
For example: Taxonomy country france I have a page:
https://www.sitename.nl/country/francefor a region I have https://www.sitename.nl/region-france/regionname
At every taxonomy archive I’ve added a filter form, where the user can filter with from several different taxonomies. Issue is that when I filter at the page of France, it shows results from (as example) Italy as well.
I’m using a custom function to show the results. I know I’ll have to add something like:
$arg = array( 'country' => 'france' ); $query = new WP_Query( $arg );
only changing ‘country’ => ‘france’ to something that automatically the right taxonomy etc. is added to the array.
When i’m at the region page it should add: ‘region-country’ => ‘region-name’.
Any clue how to do this?
https://www.ads-software.com/plugins/ajax-wp-query-search-filter/
- The topic ‘Search results show results of all taxonomies’ is closed to new replies.