Forums › Forums › Search & Filter Pro › Limit search results before filtering
- This topic has 8 replies, 2 voices, and was last updated 6 years, 1 month ago by Anonymous.
Viewing 9 posts - 1 through 9 (of 9 total)
-
Anonymous(Private) October 8, 2018 at 1:29 pm #190343
Hello,
I’d like to limit what’s visible before and after filtering. Is there a way to set a class for before and after filtering? Or is there something in place already?
I don’t want all results to be invisible before filtering, only some (those with a certain class that I’ve set).
Thanks.
Anonymous(Private) October 9, 2018 at 7:35 am #190495Perfect, that works. Thank you very much!
For others, the answer was to add the following lines in the results.php, which adds a “not-sf-filtered” or “sf-filtered” class:
global $searchandfilter; $sf_current_query = $searchandfilter->get(1075)->current_query(); if (!$sf_current_query->is_filtered()) { $is_filtered = " not-sf-filtered"; } else { $is_filtered = " sf-filtered"; } ?> <div class="content-width<?php echo $is_filtered;?>">
-
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)