• 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 Class To Genesis Archive Excerpts Only If Manual Excerpt Is Added

This code adds a custom class to the manual excerpt when excerpts selected using the Genesis > Theme Settings > Content Archives > Display > Entry Excerpts and manually added in the Excerpt meta box as seen in the following example :

When you add content in this box and use the Entry Excerpts setting, you’ll find the output look like this when you inspect the HTML element :

The above excerpt is wrapped in a custom class.

If the content is not added in this box, no custom class is added to the_excerpt as you can see in the HTML output :

This code enables you to conditionally modify the excerpts on archive pages in Genesis.

Login or register to access the code snippet :

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
 

Loading Comments...
 

You must be logged in to post a comment.