(', ' ', $links); $links = str_replace(')', ' ', $links); $links = str_replace('(', ' ', $links); return $links; } /** * Adding addtional markeup to the Categories widget * fot custom styling */ add_filter('wp_list_categories', 'politics_cat_count_span'); function politics_cat_count_span($links) { $links = str_replace(' (', ' ', $links); $links = str_replace(')', '', $links); return $links; } ?>