Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How do I remove title attributes from WP links?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43250
    jlknauff
    Member

    I’m using functions.php to strip the auto-generated title attributes from links and have got most to work, but there are still some links that I can’t find the right functions to call to strip their title attributes; for example, the links for “Post a Comment,” “Recent Posts,” and “Archives.” Any help would be greatly appreciated.

    P.S. I know the title can be suppressed with js, but it’s still in the code.

    Below is the code I’m currently using in my functions.php:

    // Remove title attributes

    function remove_title_attributes($input) {
    return preg_replace(‘/s*titles*=s*([“‘]).*?1/’, ”, $input);
    }
    add_filter( ‘the_category’, ‘remove_title_attributes’ );
    add_filter( ‘wp_list_categories’, ‘remove_title_attributes’ );
    add_filter( ‘get_the_category’, ‘remove_title_attributes’ );
    add_filter( ‘wp_list_pages’, ‘remove_title_attributes’ );

    #127579

    Go to admin panel > pages > allpages > quick edit > tick uncheck in allow

    #127593
    jlknauff
    Member

    That has nothing to do with the question I asked.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.