The following code works perfectly to show all the categories for a custom post type. However when there are no categories it echos 'No Categories'. How would I remove this?
<?php //Category Display for Custom Post type - Video
$customPostTaxonomies = get_object_taxonomies('opd-music');
if(count($customPostTaxonomies) > 0)
{
foreach($customPostTaxonomies as $tax)
{
$args = array(
'orderby' => 'name',
'show_count' => 0,
'pad_counts' => 0,
'hierarchical' => 1,
'taxonomy' => $tax,
'title_li' => '',
'echo' => 0,
'style' => 'simple'
);
echo '<span class="sort-button-filter">';
echo '<a href="';
echo $alllink;
echo '">All</a>';
echo str_replace( '<br />', '', wp_list_categories( $args ) );
echo '</span>';
}
} ?>