What is the ‘selected’ parameter in wp_dropdown_categories() for?
The selected parameter just defines which option is selected when the select field is rendered. it’s an optional parameter that defaults to the current category or 0 $defaults[‘selected’] = ( is_category() ) ? get_query_var( ‘cat’ ) : 0; (https://developer.wordpress.org/reference/functions/wp_dropdown_categories/) This function is for rendering a category drop down, but you can override it to work … Read more