This Pro tutorial provides the steps to show a form on single posts on the front end for admins and the post author using which the post title, WordPress content and custom field values can be updated in Bricks.
We are going to
- call the
acf_form
andacf_form_head
functions. - use the bricks/element/render filter to output the specified Section only if the currently logged-in user is admin or is the author of the current Post/Page/CPT item.
Step 1
Ensure that Code Execution is enabled for admin user role at Bricks → Settings → Builder access.
Edit the Template that applies to single items of your post type - posts in this example with Bricks.
Add a Section.
STYLE → CSS → CSS ID: acf-form-section
Add a Heading inside this Section's Container and set its text to "Edit this post".
Add a Code element below it having:
This is a BricksLabs Pro tutorial.
For full access login below or create your BricksLabs Pro account