I read Documentation about “Using acf_form to create a new post”. I placed that code within my themes functions.php file. I make template with following code:
<?php
$args = array(
‘post_id’ => ‘new’,
‘field_groups’ => array( 123 ),
‘submit_value’ => ‘Make new thing!’
);
acf_form( $args );
also use acf_form_head(); get_header(); the_post();
I make fields group, named “New Post”, with fields “Post Title”,”Post Body”.
Template page only show submit button ‘Make new thing!’
I don’t understand ‘field_groups’, What should write within array( ). Or where i found field_groups id like 123 or 387 ?
I am a beginner, for solve i try a lot, please help me.
What is it you would like to achieve shatilarefin? Give me a real world example and I will see what I can do to explain.
I need a frontend post, where user can add post in frontend. Website link is http://tolett.com/?page_id=5 .
Is there a reason you want to have people add posts from the front-end? Seems a little dangerous.
This plugin does what you want to do but also allows you to control what is published at the end of the day.
http://wordpress.org/plugins/frontend-uploader/
Hi @shatilarefin
When you edit a field group, take note of the post_id parameter in the URL. This is the field group ID and you can use it in the $args array of acf_form.
Thanks
E