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 Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.