Skip to content

Instantly share code, notes, and snippets.

@rmorse
Created January 20, 2016 08:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmorse/e76fea68c9aab874155a to your computer and use it in GitHub Desktop.
Save rmorse/e76fea68c9aab874155a to your computer and use it in GitHub Desktop.
Search & Filter Pro - Active Query - Check to see if a user has selected any filters
<?php
//Get an array of objects containing data for the current search/filter
//replace `1526` with the ID of your search form
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1526)->current_query();
echo $sf_current_query->is_filtered();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment