WP SITES

3095 Coded Tutorials & 297 Plugins

Add Custom Class To HTML Tag In Genesis

This code will add a class named custom-class, to the ul li tag ( Unordered List ) conditionally.

Here’s the default HTML before the custom class is added :

<li>

And here’s the HTML output once the code in this solution is installed :

<li class="custom-class">

You can use this code to add a custom class to any existing class conditionally.

Register or login to access the download folder :

Was this helpful?

Yes
No
Thanks for your feedback!

Leave a Reply