We are building an extension for displaying vacancies. On the overview page of the vacancies we display filters (taxonomies) which are used for filtering the results. We do this by adding a tax_query to wp_query. This works fine for the results but we only want to display the taxonomies/taxonomy value in the filter list if it exists in the result-set. So, if we for example filter on "Region" = "Canada" we do not want to display the other regions since they do not exist in the result-set. So, I would like to count the taxonomy/taxonomy-value from the wp_query results and only display as filter if > 0. Only, I cannot find a way to do this. So bottomline I would like to get taxonomies/taxonomy values based on the result of wp_query. Any tips?
custom post types - Get taxonomy values based on wp_query results
评论列表(0)
- 暂无评论