Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @sameer Panda

    1. For this you need to create child theme.Reference here for child theme
    2. Now in function.php in child theme’s folder add the following code:

    function my_menu_notitle( $menu ){
      return $menu = preg_replace('/ title=\"(.*?)\"/', '', $menu );
    
    }
    add_filter( 'wp_nav_menu', 'my_menu_notitle' );
    add_filter( 'wp_page_menu', 'my_menu_notitle' );
    add_filter( 'wp_list_categories', 'my_menu_notitle' );

    3. This code doesnot show anything on hover.
    4. Now activate child theme.
    Note: Please customize files of child theme, so your changes will not overwrite on theme update.

    Thank You!!

    Reply

    Hi Sameer,

    I hope you are well today and thank you for your question.

    You can try achieving this by using the child theme of Sparkling theme shared in the following reply.

    https://colorlib.com/wp/forums/topic/wrong-title-attribute-menu-with-font-awesome-icons/#post-27746

    Then in the functions.php file of that child theme find the following code

    $atts['title']  = ! empty( $item->attr_title )        ? $item->attr_title        : '';

    and change it as following.

    $atts['title']  = '';

    Best Regards,
    Movin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘On hover showing Title attribute’ is closed to new replies.