Skip to content

Instantly share code, notes, and snippets.

@PiotrKrzyzek
Created August 1, 2018 02:21
Show Gist options
  • Save PiotrKrzyzek/34b79ff755922396ef41f92cacb0d12f to your computer and use it in GitHub Desktop.
Save PiotrKrzyzek/34b79ff755922396ef41f92cacb0d12f to your computer and use it in GitHub Desktop.
Add Reset All Filters link to filters
<?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