admin管理员组文章数量:1427650
I'm trying to design a form that creates a post, with the help of Advanced Custom Fields (ACF).
The post has a custom post type of 'movie' and has custom fields of type 'relationship' that link to other posts of type 'genre'.
I use this code for the form
<?php
acf_form_head();
?>
<?php
acf_form(array(
'post_id' => 'new_post',
'post_title' => true,
'new_post' => array(
'post_type' => 'movie',
'post_status' => 'publish'
),
'submit_value' => 'Create a new movie'
));
?>
which makes a form like this
but 'the Movie Genre' field isn't working, Thanks in advance for your time any help or suggestions are much appreciated.
I'm trying to design a form that creates a post, with the help of Advanced Custom Fields (ACF).
The post has a custom post type of 'movie' and has custom fields of type 'relationship' that link to other posts of type 'genre'.
I use this code for the form
<?php
acf_form_head();
?>
<?php
acf_form(array(
'post_id' => 'new_post',
'post_title' => true,
'new_post' => array(
'post_type' => 'movie',
'post_status' => 'publish'
),
'submit_value' => 'Create a new movie'
));
?>
which makes a form like this
but 'the Movie Genre' field isn't working, Thanks in advance for your time any help or suggestions are much appreciated.
Share Improve this question asked May 5, 2019 at 14:16 Ds RedDs Red 12 bronze badges 1- Can you clarify "'the Movie Genre' field isn't working"? – nmr Commented May 17, 2019 at 7:27
1 Answer
Reset to default 0If the values do not load there is either an error in JavaScript or an error in PHP during hte AJAX request.
JavaScript errors are usually caused by plugin conflicts. To begin debugging this start disabling other plugins to see if you can clear it up.
PHP errors during AJAX can be found by enabling error logging https://codex.wordpress/WP_DEBUG
本文标签: pluginsCreating posts with acfform() that has a relationship type field
版权声明:本文标题:plugins - Creating posts with acf_form() that has a relationship type field 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745485214a2660351.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论