This is a good idea, thank you. 🙂
Hey,
thanks for the awesome Plugin. I got one question:
I linked a Field Group (for an Option page) and linked this over 4 sites. When i edit a field (eq field name or something else) it will work fine – but not when i edit a value over the option panel. Is this not possible?
Hey,
did you find a solution for it? I have the same issue.
Greetings
Hey,
did you find a solution for it? I have the same issue.
Greetings
Using the Field Key (field_535e34692df42) was the solution!
Hey @Elliot,
when i set some posts into a relationship Field with update_field, they will be set only after re-saving the post. why?
Hi StormTrooper,
this code works for me:
add_filter('acf/pre_save_post' , 'my_pre_save_post' );
function my_pre_save_post( $post_id ) {
global $post;
if($post->post_name == 'some-post') {
// Create a new post
$post = array(
'post_status' => 'publish' ,
'post_title' => 'some-title',
'post_type' => 'some-post-type',
);
// insert the post
$post_id = wp_insert_post($post);
// update custom field
update_post_meta($post_id, 'some-customfield', $post_id);
do_action('acf/save_post', $post_id);
//do_action('acf/save_post' , $post_id);
wp_redirect( '/some-page-to-redirect/', 301);
exit;
}
}
Check your site for Javascript errors if the function does not work… 🙂
Greetings
Christian
push…
No one has an idea?
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.