Revision: 30379
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 13, 2010 01:35 by jamiebrwr
Initial Code
/******* CUSTOM CLINIC TAXONOMY DROPDOWN *********/ function get_terms_dropdown($taxonomies, $args){ $myterms = get_terms($taxonomies, $args); $firstitem = "<option value=\"\">Choose a clinic...</option><option value=\"about/providers\"><strong>* Show All Providers *</strong></option>"; $output ="<select name=\"clinic\" onchange=\"window.open(this.options[this.selectedIndex].value,'_top')\" style=\"background:transparent;\"> $firstitem"; foreach($myterms as $term){ $root_url = get_bloginfo('url'); $term_taxonomy=$term->taxonomy; $term_slug=$term->slug; $term_name =$term->name; $link = $term_slug; $output .="<option value='clinic/".$link."'>".$term_name."</option>"; } $output .="</select>"; return $output; }
Initial URL
Initial Description
Place into fucntions.php
Initial Title
Custom Clinic Taxonomy Dropdown
Initial Tags
wordpress
Initial Language
PHP