This members-only tutorial provides the steps to use Advanced Custom Fields to build a form that logged in users can fill on the front end to submit news i.e., populate a Custom Post Type as drafts in Oxygen.

Admin can then review and publish the entries which can be easily set to appear on the front end using Easy Posts component.

There are various ways in which frontend posting can be set up. I shall cover a few other methods in future tutorials.

Non logged-in visitors will see

Step 1

Let's create the News CPT.

Install and activate Custom Post Type UI.

Step 2

Install and activate ACF or ACF Pro.

Add a new field group titled say, "News Fields".

In this example, since we want the users to enter the URL of their news source, add a Url type field (news_source).

Also, add an Image type field (news_image) that will be mapped later to the featured image of the News CPT entry.

Set the field group to appear on News CPTs.

Step 3

Let's map the image custom field to the CPT entry's featured image.

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: Set uploaded image as featured image for news articles

Code:

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: