Home › Forums › General Issues › Unable to set title in ACF form created CPT post › Reply To: Unable to set title in ACF form created CPT post
Hi @phil-owen
If you are using the latest version of the plugin, you need to change your syntax to the following:
$name = $_POST['acf']['field_57c072a1a59c4'];
You may also want to hook into the acf/save_post filter instead of the acf/pre_save_post.
You can also change the slug by making use of the ‘post_name’ argument when generating the $post data.
I hope this info helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.