A custom category walker should do what you need.
class My_Cat_Walker extends Walker_Category {
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
extract($args);
$cat_name = esc_attr( $category->name );
$cat_name = apply_filters( 'list_cats', $cat_name, $category );
$output .= '<li>'.$cat_name.'</li>';
}
}
$args = array(
'orderby' => 'name',
'show_count' => 0,
'hierarchical' => 1,
'taxonomy' => $tax,
'title_li' => '',
'data-filter' => '',
'hide_empty' => false,
'walker' => new My_Cat_Walker
);
echo '<ul>';
wp_list_categories($args);
echo '</ul>';
If you look at the source for the parent walker, you will notice that the start_el()
method does a lot more work that this one does. I don’t know how complex you need this walker to be. What you see above is a very bare bones version.