如何使用ACF表单在前端发布

时间:2017-09-05 07:07:27

标签: php wordpress frontend advanced-custom-fields

<?php 

    acf_form_head();
    get_header();

?>
<div id="content">

    <?php

        acf_form(array(
            'post_id'       => 'new_post',
            'post_title'    => true,
            'post_content'  => true,
            'new_post'      => array(
                'post_type'     => 'event',
                'post_status'   => 'publish'
            )
        ));

    ?>
</div>

我使用此代码显示用户的前端帖子类型,但我收到错误并保留此信息:

  

警告:array_merge():参数#1不是数组   /home2/mindblow/public_html/programming/sample-project/wp-content/plugins/advanced-custom-fields/core/api.php   在1185行

0 个答案:

没有答案