Hi, I am in need of some help with a wordpress function. I've been looking for a solution for a while now and have not been able to figure it out. The code I am using and referring to is -
<?php //first get the current term $current_term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); //then set the args for wp_dropdown_categories $args = array( 'child_of' => $current_term->term_id, 'taxonomy' => $current_term->taxonomy, 'hide_empty' => 0, 'hierarchical' => true, 'depth' => 2, 'title_li' => '', 'show_option_all' => All, 'hide_if_empty' => true ); wp_dropdown_categories( $args ); ?>
I want to know how can I modify the select dropdown so that I can add values and classes to <select> and <option>'s ? Any help would be greatly appreciate it. Thanks.