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 :

Related Tutorials

Join 5000+ Followers

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