This members-only tutorial provides the steps to display image from a custom field instead of the standard featured image for posts in the output of Easy Posts element in Oxygen.
We will set this up such that featured image gets shown if an image has not been set for the Alternate Image custom field.
Install and activate Advanced Custom Fields.
Go to Custom Fields > Add New.
Add a new field group titled say, "Post Meta".
Add an image-type field labelled say, "Alternate Image".
Leave the Return Value at the default, Image Array.
Set the field group to appear on your desired post type, in this case: Post.
Add/edit your posts (or entries of a CPT) and select/upload images that you want to appear in the output of Easy Posts element on the listing page (like Posts page i.e., Blog).
Edit the Template for your listing page.
In this example, that would be the Template that applies to Blog Posts Index.
Edit it with Oxygen.
Add an Easy Posts element.
In this example we shall begin with the "List - Image on Left" preset.
Go to Primary > Templates > Template PHP and replace all the code with:
This is a premium members-only content.
To view the rest of the content, please sign up for membership (one-time payment for lifetime access).
Already a member? Log in below or here.
Enter your email address to subscribe to this blog and receive notifications of new tutorials by email.
Join 88 other subscribers
Please log in again.
The login page will open in a new tab. After logging in you can close it and return to this page.