- This topic has 2 replies, 2 voices, and was last updated 6 years, 8 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
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 › Check to see if anything has been searched
I have a combined Filter/Search-Bar.
I need in my result.php a characteristic if my result is filtered/searched or not (f.e. a additional class). I can do that with this code:
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1800)->current_query();
if ($sf_current_query->is_filtered()) {
// do something
} else {
// do something else
}
?>
But it works only for filters, not for the searchbar. Is there another code to check if something is searched if no filters are used?