Support » Theme: Vega » Remove menu tooltip

Viewing 15 replies - 1 through 15 (of 16 total)
  • Theme Author lyrathemes

    (@lyrathemes)

    I would suggest setting up a Child Theme with the title tag removed from the navigation code. Here is a sample functions.php for the child theme: https://gist.github.com/lyrathemes/c83a7b7a3a1f0563e095b456c00045a0

    Or go through this thread for possible solutions: http://stackoverflow.com/questions/15364063/is-it-possible-to-hide-the-title-from-a-link-with-css

    I’ve tried to find the code responsible for navigation bar, but i didnt’ find it!

    Btw how can I make a child theme for vega theme?

    Ok I made a child theme. Now I need to make a new file named functions.php and paste the code from github?

    Theme Author lyrathemes

    (@lyrathemes)

    Yes – but I just thought of something else. Go to Appearance > Menus and edit the main menu – then add your own Title attributes: http://prntscr.com/dc5uun

    That language switcher is custom link not a page, post or category. I activated the title attribute, but didn’t appear this section on my language switcher.

    Look at this. Is from theme, really don’t know how to handle it!

    I’ve made a new custom link named Facebook with url: “http://facebook.com” and Title attribute: “Another title”. When i go to the site to test if it works, it didn’t.

    Look at the screenshots down below

    • This reply was modified 3 years, 2 months ago by antohimarius.
    Theme Author lyrathemes

    (@lyrathemes)

    Oh this is only happening with the language switcher menu? You’ll need to ask the plugin developers to help you with this as we’re using the default WordPress menu system to create/show menus.

    Hi autohimarius,

    I struggled with removing the tooltips, tried altering the menu attributes as well as. a plugin. No success.

    What finally worked for me is creating a child theme, then adding this code to the new functions.php file located in: public_html or www / subfolder if you use one /wp-content/themes/vega-child

    code:

    <?php
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    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' );
    
    ?>

    reference: http://wordpress.stackexchange.com/questions/23469/disabling-tooltip-on-menu-items

    Thank you very much man! It works 😀

    Fantastic…

    Theme Author lyrathemes

    (@lyrathemes)

    Sounds good guys. One thing though – did you want to hide the tooltip completely or didn’t like the default tooltip that was appearing? Just need to keep record in case there is something we need to fix. Best of luck with the website!

    I am using code to show fa icons on my menu.

    e.g. Navigation Label: <span class=”fa fa-home” aria-hidden=”true”></span> Home

    That code works to show the icon but, was also showing as text for the tool tip.

    The solution above was the only way I could figure out to remove the tool tip.

    Theme Author lyrathemes

    (@lyrathemes)

    I can see that now @bb-4. I am noting this down as a fix for our next update. I think it may have something to do with the library we’re using here https://github.com/twittem/wp-bootstrap-navwalker

    Should I try removing function.php code after the next update?

    Theme Author lyrathemes

    (@lyrathemes)

    Not this update – we pushed one last night (version 2.1). This is something we’ve planned for 2.1+. Thanks for following up 🙂

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Remove menu tooltip’ is closed to new replies.