12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Nov 9, 2021

Frontend editing with ACF in Oxygen

Sridhar Katakam

This members-only tutorial provides the steps to use Advanced Custom Fields for adding a form having the fields to edit the title and content on singular Pages, Posts and CPT items on the frontend.

We shall ensure that the form is output for admins and logged-in users that should be able to edit the form i.e., only if the user is the author of the post.

Also, we are going to set up a basic dashboard Page where the logged-in users (that have the permission to publish) will see the posts that they have published with links to view and edit. Clicking the Edit link will open the post on the frontend and jump to the editing form.

Step 1

Let's have acf_form_head() run in the correct place conditionally.

Install and activate Code Snippets plugin.

Go to Snippets > Add New.

Title: acf_form_head() - Register the necessary assets (CSS/JS), process the saved data, and redirect the url

Code:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-ocalendar-check-omagnifiercrossmenuchevron-downarrow-right