- This topic has 12 replies, 2 voices, and was last updated 5 years, 11 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Category description in search results
I added this code:
https://www.screencast.com/t/WYIjHhwBYb
This:
global $searchandfilter;
$sf_current_query = $searchandfilter->get(332)->current_query();
$sf_current_query_array = $searchandfilter->get(332)->current_query()->get_array();
if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
echo '<div>No category selected.</div>';
} else {
echo '<div>' . $sf_current_query_array["_sft_category"]["active_terms"][0]["value"] . '</div>';
echo '<div>' . $sf_current_query_array["_sft_category"]["active_terms"][0]["id"]. '</div>';
echo '<div>' . category_description($sf_current_query_array["_sft_category"]["active_terms"][0]["id"]). '</div>';
}