Home Forums Front-end Issues Shortcode ACF frontend form Reply To: Shortcode ACF frontend form

  • Hi @buylov

    Please learn the code carefully. Also, please learn more about creating a shortcode here: You also need to learn about PHP here: If you don’t want or don’t have time to learn them, please hire a developer to help you out with it. I’d recommend looking for one on or

    shortcode_atts() is used to add default values to the attributes. So you need to set the default values from acf_form() in this function. Something like this:

    $atts = shortcode_atts( array(
        'acfposttype' => 'post',

    After that, you can get the attributes using the key like this: $atts['acfposttype'], so it looks like this:

        'post_title' => $atts['acfposttitle'] === 'true'? true: false,
        'new_post'		=> array(
            'post_type'	=> $atts['acfposttype'],
            'post_status'	=> 'publish',

    I hope this makes sense.