• Resolved Katrienmoore

    (@katrienmoore)


    HI,

    I am building a website for a local school using openstrap.
    It seems that the title attribute in the menu is not working correctly.
    On hovering over the menu the hover text displays the text I put into the navigation label and not the text I put into the title attribute.
    Can someone help me with this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • mrtom414

    (@mrtom414)

    do you have a link showing what your talking about ?

    Thread Starter Katrienmoore

    (@katrienmoore)

    Hi Guys,

    A lovely guy in the openstrap support gave me the solution to this problem.
    It works perfectly now.
    If you have the same problem try this:

    n functions.php, there is a class that is used to rendere nav menu. If you can check around line #689 (latest theme) you will see like

    $atts[‘title’] = ! empty( $item->title ) ? $item->title : ”;

    you can go ahead and update it to

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

    Your menu title will be shown

    Thank you for this! Had the same issue working with the Bootstrap theme – the code that needs to be replaced is in the inc/wp_bootstrap_navwalker.php script on line 78. I was using <span> tags in the menu for icons, and they were showing up on hover no matter what I changed the title attribute to.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘title attribute in menu not working’ is closed to new replies.