Plugin Author
scribu
(@scribu)
That would mean that you don’t want the taxonomy name to be displayed before the <select>, as it is now, right?
That’s right. Output the taxonomy as the first option and not have it appear outside of the dropdown.
Plugin Author
scribu
(@scribu)
Open widget.php and replace this:
get_taxonomy( $taxonomy )->label . ': ' . scbForms::input( array(
with this:
scbForms::input( array(
'text' => get_taxonomy( $taxonomy )->label,
That’s fabulous. Thanks so much!
Just to build on this question, how do I populate the first dropdown option with the first taxonomy tag?
As a concrete example, I have a dropdown for “City” taxonomy with 2 cities in it, Bangkok and Chiang Mai. I’d like Bangkok to appear as the default selected option.
It looks you’ve changed the plugin since you answered to jennygold. I don’t find the same exact line in the current version of the. Would you please help me out how to achieve the same efffect? Thanks.
I got the solution.
Go to widget.php, search for
.html( 'select', array( 'name' => qmt_get_query_var( $taxonomy ) ),
'<option></option>'
(line 179 and 180 to me)
And change <option></option>’ to <option>My first option here</option>’