Home / functions.php / Remove title attribute from wp_tag_cloud
  • How to Remove title attribute from wp_tag_cloud


    Adding this snippet to the functions.php of your wordpress theme will remove the title=”” attribute from the anchor tags when using wp_tag_cloud.

    ( click code to copy )

    wordpress snippet : PHP

    function replace_wps_title_att($output) {
    	$output = preg_replace('` title="(.+)"`', '', $output);
            return $output;

    ( WordPress codex functions, hooks, in this snippet. )

    wp_tag_cloud, add_action, wp,