Created
August 1, 2018 02:21
-
-
Save PiotrKrzyzek/34b79ff755922396ef41f92cacb0d12f to your computer and use it in GitHub Desktop.
Add Reset All Filters link to filters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $filterreset = $_SERVER['REQUEST_URI']; | |
if ( strpos($filterreset,'?filter_') !== false | strpos($filterreset,'?min_price') !== false | strpos($filterreset,'?max_price')) { | |
$filterreset = strtok($filterreset, '?'); | |
echo '<div class="clear-filters-container"><a id="woo-clear-filters" href="'.$filterreset.'">Clear All Filters</a></div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment