Skip to content

Commit

Permalink
fixes filters when taxonomies have query_var set
Browse files Browse the repository at this point in the history
  • Loading branch information
hughc committed Mar 15, 2016
1 parent ee00a0e commit e9dfd11
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions inc/filter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public function get_markup()
{
$walker = new WCMF_walker;
foreach ( $this->taxonomies as $tax )
{
{
$fullTax = get_taxonomy( $tax );
$qString = isset($fullTax->query_var) ? $fullTax->query_var : $tax;
wp_dropdown_categories( array(
'taxonomy' => $tax
,'hide_if_empty' => true
Expand All @@ -47,10 +49,10 @@ public function get_markup()
,'hierarchical' => is_taxonomy_hierarchical( $tax )
,'show_count' => true
,'orderby' => 'name'
,'selected' => '0' !== get_query_var( $tax )
? get_query_var( $tax )
,'selected' => '0' !== get_query_var( $qString )
? get_query_var( $qString )
: false
,'name' => $tax
,'name' => $qString
,'id' => $tax
,'walker' => $walker
) );
Expand Down

0 comments on commit e9dfd11

Please sign in to comment.