[Plugin: Relevanssi – A Better Search] How can I display categories found in the search result?
-
I am using the code below in order to display the search query result count:
<?php echo 'Relevanssi found ' . $wp_query->found_posts . ' hits'; ?>
It works perfectly! But in front of this message I want to list all the categories within the search result. For example, the user searches for Car.. The result is bringing all posts that have something to do with Car.. Okay
But hair is not a category, Car wash, Car Cleaning, Car Waxing are categories. So I want to say: We found $wp_query->found_posts results in the category Car Wash, Car Cleaning and Car Waxing.
How could I achieve this result?
Thank you for any insights
- The topic ‘[Plugin: Relevanssi – A Better Search] How can I display categories found in the search result?’ is closed to new replies.