Skip to content

Instantly share code, notes, and snippets.

@brlafreniere
Last active March 10, 2017 06:42
Show Gist options
  • Save brlafreniere/5a33b2ab82c99a69394449545bd120bb to your computer and use it in GitHub Desktop.
Save brlafreniere/5a33b2ab82c99a69394449545bd120bb to your computer and use it in GitHub Desktop.
foreach ($_GET as $get) {
foreach ($tax_names as $tax) {
if (isset($_GET['spg_'.$tax->name])) {
$remove_filter = '<input type="button" onclick="window.location=\''.get_the_permalink().'\';" class="button button-submit" value="'.__("Remove Filter","infiwebs").'"/>';
$display = 'tax_query';
$posts_from_filter[] = array(
'taxonomy' => $tax->name,
'field' => 'slug',
'terms' => $_GET['spg_'.$tax->name]
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment