Forum Replies Created

Viewing 1 replies (of 1 total)
  • sinusite

    (@alexsinusite)

    yeah it seems ‘this part’ is not finished ??

    Well you can do that (but it’s baaaad and harcoding) :
    go wp-include/media.php line 1380 insert something like that:

    // make a select if is a taxonomy
    		if ($field['taxonomy'] == 1){
    			$terms = get_terms('YOUR_TAXONOMY', 'orderby=name&hide_empty=0');
    			$item .= "<select class='select-".$term->slug."' id='$id_attr' name='$name' $readonly required>";
    			$selected = 'selected';
    			$item .= '<option value="" '. $selected.'>Choose...</strong></option>';
        		foreach ($terms as $term) {
        			$selected = ($term->slug == $field['value'] ) ? 'selected':'';
        			$item .= '<option value="'. $term->slug .'" '. $selected.'>' . $term->name . '</option>';
        		}
    			$item .= "</select>";

    But the cleanest way is to change the text field with jQuery in your theme or plugin – because here you will loose code after an update of WP…

Viewing 1 replies (of 1 total)