• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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 :

Register for full access

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags