Archived topic
Add data attibute to primary menu
1 reply · Started by Asepeyo MCcSS 151 on November 15, 2018
Hi Tom,
I want to add a data attribute to the links of my primary menu to add some css effects.
I have searched for the way but I have not found how to add them.
Can you give me some clue?
Thank you in advance!
this is an example of what I want to get:
<li id="menu-item-41" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-41 sfHover"><a href="#" <strong>data-hover="what you need"</strong> class="menu-item-dropdown-click">What you need</a>
Hi there,
Something like this might do the trick: https://wordpress.stackexchange.com/a/124153