Home Forums ACF PRO ACF with Social Article Reply To: ACF with Social Article

  • Thanks @topy

    You had missed out step 6 from my tutorial completely – IE the code to actually show the form, was not placed into your Form.php page template.

    I did this, and the form showed immediately 🙂

    Screenshot of how the code should look:
    Screenshot of your site with the form:

    So all you need to do is open your Form.php and put this code wherever you want the form to appear:

    	$formoptions = array(
    		'post_title'      => true,
    		'post_content'    => true,
    		'post_id'         => $new_post,
    		'new_post'        => array(
    			'post_type'       => 'post', // change this to the post type you need
    			'post_status'     => 'publish' // do you want the post to be published immediately? otherwise change this to 'draft'
    		'field_groups'    => array(9), // change this number to the ID of your field group
    		'submit_value'    => 'Publish',
    		'return'          => get_permalink(24), // change this ID to the page you want to send the user back to when they've submitted the form - perhaps a thank you page
    		'uploader'        => 'wp'

    Hope this helps 🙂