Custom self builded,
the ‘acf_form_head()’ is included before ‘get_header()’ get called.
Nvm. I found the problem. I had iris included in theme main wp_enqueue_scripts action.
But why should this be a problem?
I have no other plugins running, only acf & stock wp.
my template src:
<?php acf_register_form(array(
'id' => 'save_meeting',
'post_id' => 'new_post',
'new_post' => array(
'post_type' => 'termin_type',
'post_status' => 'publish'
),
'post_title'=> true,
'post_content'=> false,
)); ?>
<?php acf_form("save_meeting"); ?>
Its just an custom type with some acf elements.
I know that the color-picker works in back-end & all other acf elements also on front-end. (E.g. date-time, post-object, map)
acf: 5.6.10 – git src
wp: 4.9.6
I also downgraded to an old acf version, but same result. I dont include any other resources manually.
What do you mean with
I need create post for anonymous user
?
“wp_get_current_user” only returns a valid output while a user is logged in, so forget this.
Do you want an form that creates posts with an “anonymous user” profile? Thats not possible. But you can create a User called anonymous and use this as post_author.
Never mind, got it.
Just needed to add acf/save_post hook too 🙂