Home › Forums › Front-end Issues › acf_form without loggin in › Reply To: acf_form without loggin in
Hi @markbloomfield,
Thanks for your reply. Unfortunately, I already tried it like that, and now again, but it still fails when a user is not logged in.
I get redirected back to the same page I already am on as soon as I use post_author in the array.
`<?php
$new_post = array(
‘post_id’ => ‘new’,
‘post_author’ => ‘9’,
‘field_groups’ => array(2023,2028),
‘form’ => true,
‘return’ => ‘%post_url%’, // Redirect to new post url
‘html_before_fields’ => ”,
‘html_after_fields’ => ”,
‘submit_value’ => ‘Melding plaatsen’,
‘updated_message’ => ‘Melding geplaatst!’
);
acf_form( $new_post );
?>
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.