wp_list_categories()
isn’t the right function for this kind of output, as that is meant for displaying <ul>
lists.
Instead you should be looking at get_categories()
, that instead only gets all the info about the categories and doesn’t apply any formatting to it.
For your desired output you can use something like this:
<?php
$args = array(
'hide_empty' => 0,
'orderby' => 'name',
'order' => 'ASC',
);
$cats = get_categories($args);
if ( $cats ) {
echo '<select class="filters-select">'; //echo the select
//loop through each category and echo as option for the select
foreach ($cats as $cat) {
echo '<option value="'. $cat->slug .'">'. $cat->cat_name .'</option>';
}
echo '</select>'; //close the select
}
?>