Home Forums General Issues Edit an existing post with acf_form


Edit an existing post with acf_form

  • Does anyone know of a good way to set up a link to edit a post using acf_form?
    I’m keeping all users out of the admin on my site so all posts are submitted with an acf_form but I’m not sure how to allow a user to edit the form. Any ideas?

  • You can place the acf_form() code in the template that shows posts and it will automatically edit the post that’s displayed.

    You can do a check to see if the user is allowed to edit the post in question do decide if the form should be included.

    If you wan you could have this form hidden by default using CSS or some other method and then you could add a “edit post” link or button on the page as well that runs some JavaScript to show the form.

  • Nice! Thanks that solution worked perfectly.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Edit an existing post with acf_form’ is closed to new replies.