Tell us what you are trying to do?
I want to style the multiple select options a little differently. I would like the top options to be bold and replace the "-" in front of the sub-options with a list bullet or something like that. Or at least add a space after the "-" --See Screenshot attached.
Is there a similar example that we can see?
https://stackoverflow.com/questions/32764493/how-to-add-sub-item-in-drop-down-list
What is the link to your site?
hidden link
Hello,
I assume we are talking about the shortcode [wpv-control-post-taxonomy] in Views custom search form, see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-control-post-taxonomy
there isn't exact option to achieve what you want:
I would like the top options to be bold and replace the "-" in front of the sub-options with a list bullet or something like that.
But you can add a space after the "-", by setup the attribute "format", for example:
[wpv-control-post-taxonomy format=" %%NAME%%" ...]
There is a space before the %%NAME%%
Hi Luo, thank you very much for the quick reply. Adding the extra space works.
Too bad I can not add any other styling. Maybe you could think about adding some css classes to sub-items in future releases. Or would that NOT make sense?
<option value="mainoption" class="mainoption"> Main Option</option>
<option value="suboption1" class="suboption"> Sub Option</option>
<option value="suboption2" class="subobption"> Sub Option</option>
Thanks again and I guess we will just have to live with it then. I thought there might be a way by using a script in functions.php to change the output.