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 :

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.