Home › Forums › Backend Issues (wp-admin) › wp_update_post problems › Reply To: wp_update_post problems
The post is created by a user using formidable pro form which his fields are connected to the ACF fields of the post.
Once the post is created i get a mail saying there is a new post and i have a link to publish.
The link is a link to a page which uses is own template php file. in that php file i use that code:
<?php $thispropostid = $_GET[‘thispropostid’]; $postData = [ ‘ID’ => $thispropostid, ‘post_status’ => ‘publish’ ]; wp_update_post( $postData );?>
To publish the post.
Obviously the $_GET['thispropostid'];
is getting the post id from the url attribute which holds the post’s id.
That’s it. that’s the whole story… Nothing more.
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.