WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove title attribute of in wp_list_categories (1 post)

  1. Ahmed Hamouda
    Member
    Posted 1 year ago #

    You can remove it completely by 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().

    function replace_wps_title_att($output) {
    	$output = preg_replace('<code>title="(.+)"</code>', '', $output);
            return $output;
    }
    add_action('wp_list_categories','replace_wps_title_att');

    Source: http://wpsnipp.com/index.php/cat/remove-title-attribute-from-wp_list_categories/

Topic Closed

This topic has been closed to new replies.

About this Topic