Use Image from Custom Field as Grid Item’s Main Media

This article covers how you can use your own Custom Field Image for your Essential Grid's main Media Source.

1. Setup your Custom Image Field for compatibility.

Make sure your Custom Image Field returns the url of the image as opposed to an HTML image tag (this is automatic for most Custom Fields plugins).

2. Make a note of your Custom Field's name/slug.

For this example I’ve setup a custom field using the Types plugin, and the slug is “wpcf-my-image”.

3. Set your grid's Media Source selection to "Alternate Image".

4. Add the following to your theme's "functions.php" file.

Modify the “wpcf-my-image” part with your Custom Image Field’s name/slug.