Support

Account

Home Forums Front-end Issues Don't understand 'field_groups'

Solved

Don't understand 'field_groups'

  • 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/

    • Elliot

    • January 8, 2014 at 10:19 am

    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

  • Thanks BOSS.

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.