How To Add A New Featured Post Widget To Genesis For Custom Post Types

This code creates a featured post widget which only displays your custom post types ( CPT’s ) featured image and title, content or excerpt in Genesis child themes like this example:

cpt widget

This solution enables web designers and theme Developers the option to create a custom widget for clients rather than use a 3rd party plugin.

Included is the CSS to display each featured CPT post entry inline as seen in the above screenshot.

Rather than display the title for each post, the widget also enables you to add a custom excerpt which you can display as the title instead of the default entry title as seen in the above screenshot.

If you click on the image, it links back to each single CPT post.

You can also change the widget to display any number of featured images inline and display them by using any of the WP_Query parameters.

Code & Simple Installation Instructions

To create the new widget, simply copy and paste each snippet as instructed.

After installing the above code, you can then go to Appearance > Widgets and drag your new custom widget into your After Header widget area and configure the widget settings.

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.