Form to Filter/Sort Post On Taxonomy page

Hi, I am trying to build a form similar to the WP search form, that will allow me to refine/filter/sort posts on taxonomy and search results page. The code I have so far is this – `<form method=”get” id=”searchform” name=”searchform” action=”<?php echo $PHP_SELF; ?>”>

<label>Keywords</label><br />

<input type=”text” class=”search form-text” name=”s” id=”s” value=”<?php echo trim( get_search_query() ); ?>” placeholder=”Type keywords here” />


<select name=”post_type”>

<option value=”product” style=”color: #000;”>Legal Documents</option>

<option value=”videos”>Legal Advice – Videos</option>

<option value=”link”>Legal Advice – Links</option>

<option value=”text”>Legal Advice – Articles</option>

<option value=”post_type_c”>An Attorney</option>



//first get the current term

$current_term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );

//then set the args for wp_list_categories

$args = array(

‘child_of’ => $current_term->term_id,

‘taxonomy’ => $current_term->taxonomy,

‘hide_empty’ => 0,

‘hierarchical’ => true,

‘depth’ => 2,

‘title_li’ => ”


wp_dropdown_categories( $args );


<?php wp_dropdown_categories(‘show_option_all=All U.S. States&taxonomy=states&depth=2&orderby=name&show_count=1’:wink:; ?>


<button tabindex=”2″ type=”submit” class=”search_btn”>

<span style=”background-image:url(‘/wp-content/uploads/2012/08/smallglass.png’:wink:; background-repeat:no-repeat; display:inline-block; margin:0px auto; height:20px; width:20px; text-align:center;”></span>



More info on my question asked can be found at –

However the URL returned looks like this –

How can I adjust this so that it filters the current posts on the page?