New answers tagged

0

Easiest way: $rootId = end( get_ancestors( $term_id, 'my_taxonomy' ) ); $root = get_term( $rootId, 'my_taxonomy' ); echo $root->name;


1

You can try using Chosen. I use it because it's bundled with WooCommerce. It basically adds search box to the <select> element. I leave the styling to you. The easiest solution is to add it as a plugin. But you can add it to your theme if you want. Add the CSS and JS files: <?php function custom_scripts_wpse_215576() { //Chosen CSS file ...



Top 50 recent answers are included