Site logo

Archived topic

Add data attibute to primary menu

1 reply · Started by Asepeyo MCcSS 151 on November 15, 2018

Viewing posts 1–2 of 2

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>

This archived topic is closed to new replies.