• 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 CSS Class To Featured Image In Genesis Featured Posts Widget

This solution enables you to add a custom class to the default class included in the featured image output using the Genesis featured posts widget.

The code enables you to add the class via the safety of any Genesis child theme without modifying the code in Genesis.

In the following example, a class named added-class has been added as you can see in the HTML output :

Code Installation

Add the PHP code from the download folder to the end of your child themes functions file.

Then you can target the featured image like this :

.home-top .featuredpost .added-class {
    border: 5px #F65D52 solid;
}

Register or login to access the download folder :

Register for full access

Related Tutorials

  • Modify Genesis Featured Posts Widget

Genesis Featured Posts

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.