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.

Post being edited in the back end

Image from a custom field instead of featured image on the front end

We will set this up such that featured image gets shown if an image has not been set for the Alternate Image custom field.

Step 1

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.

Step 2

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).

Step 3

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 ($27/month).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

For adding code blocks wrap the code in three backticks. Markdown should work.
Provide a URL of your site/webpage if something is not working.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: