Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Help with Nav Menu Hover – HTML

Discussion in 'Misc WordPress Requests' started by bcworkz, Feb 19, 2018.

  1. bcworkz


    Reply To: Help with Nav Menu Hover – HTML, by bcworkz

    Oh, I see. The data-hover value is grabbed with CSS to populate the element’s “:after” content value, which is used to do a transform animation from the text link to the :after content value.

    I’m assuming the menu output is coming from a call to wp_nav_menu(). Most themes do this, but it’s not necessarily so. There are a number of filters in that function that can be used to alter the output. I think ‘wp_nav_menu_items’ filter would be a good choice. Your callback can loop through the passed items and insert the attribute based on the link text. preg_replace() should be able to do the string manipulation needed.

    Reply To: Help with Nav Menu Hover – HTML

Share This Page

Monarch Social Sharing Plugin