Thanks again for the great support!
Thanks a lot for the code block, worked perfectly!
The plugin and support here is fantastic, thanks so much.
Thanks for the help there. I did get the title and meta to update with a static value in the code at the bottom of the post.
Just having a little trouble getting the fields value from the front end form before update.
I tried a few variations of this.
function my_acf_update_value_meta( $value, $post_id, $field )
{
$field_key = “field_57205386becf2”;
$field = get_field_object($field_key);
$yoast_value = $field[‘value’];
$value = update_post_meta( get_the_ID(), ‘_yoast_wpseo_metadesc’, $yoast_value );
return $value;
}
add_filter(‘acf/update_value/key=field_57205386becf2’, ‘my_acf_update_value_meta’, 10, 3);
Working with static values:
function my_acf_update_value_meta( $value, $post_id, $field )
{
$value = update_post_meta( get_the_ID(), ‘_yoast_wpseo_metadesc’, ‘My Meta Description’ );
return $value;
}
add_filter(‘acf/update_value/key=field_57205386becf2’, ‘my_acf_update_value_meta’, 10, 3);
function my_acf_update_value_title( $value, $post_id, $field )
{
$value = update_post_meta( get_the_ID(), ‘_yoast_wpseo_title’, ‘My Meta Title’ );
return $value;
}
add_filter(‘acf/update_value/key=field_571fd28705139’, ‘my_acf_update_value_title’, 10, 3);
Thanks a lot this did help.
Maybe that is the problem, I am not using any code, LOL
I have the created a field with the name ‘form_post_title’ in the admin interface of a working field group.
Field details:
field_57215fffde574 | Page Title | form_post_title
The front end form loads and updates all other custom fields in the group. The field appears with the title populated but doesn’t update along with the other fields. Do I need to include code in my functions file?
I did read the docs but it seemed the plugin handled the update post end of it.
If I need to add something to the functions file that would explain why it is not working 🙂 Downloaded ACf Pro today and am using the latest of the plugin above.
I also installed this plugin but it does not update the field, it does fetch it though.
https://bitbucket.org/jupitercow/acf-edit-title-content
I have acf pro and am trying to do this, where do I find this option. I’ve looked at the field types and can’t seem to find it.
Thanks
Frank
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.