Updated on March 17, 2017
A user asked in Genesis Facebook group,
I want to add the option to select an alternate image in Genesis Sandbox Featured Content widget, as opposed to using the post or page featured image.
I advised the user to switch to the newer, better and actively developed Genesis Featured Posts Combo (commercial plugin) from the Sandbox plugin. One of the built-in features of GFPC is a fallback image which when set will be shown on the front end when an entry does not have a featured image.
But re-reading the user's question, I realized that the requirement is to display an alterante image which if set, should be shown instead of the featured image. This is not the same as fallback image because fallback image applies to all entries of a GFPC widget instance where as alternate image is specific to a particular entry (Page or Post etc.).
In this tutorial I show how we can use Advanced Custom Fields to create a custom image field attached to Posts and Pages followed by displaying this image instead of the entry's featured image when output via GFPC widget.
Install and activate Advanced Custom Fields. Create a custom field group having a
alternate_image image field and attach it to Posts and/or Pages [depending on what you would like to be shown in the featured widget(s)].
Edit your Pages/Posts for which you would like to use the alternate images and set them.
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.