wordpress snippets last updated   : September 29, 2014
we now have 639 snippets

Remove title attribute from wp_list_categories

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove the title=”” attribute from the anchor tag when using wp_list_categories().

snippet :  PHPcopy
function replace_wps_title_att($output) {
	$output = preg_replace('` title="(.+)"`', '', $output); 
        return $output;
}
add_action('wp_list_categories','replace_wps_title_att');

Did you like this post? If so please share it with your friends. Thanks!