Home › Forums › Backend Issues (wp-admin) › set wp_title(); as acf field › Reply To: set wp_title(); as acf field
Hi John! Thanks for the advice. I editet the script like below but it still does not work:
function update_acf_title($value,$post_id, $field){
$post_title = get_the_title( $post_id );
update_field('titel', $post_title, $post_id);
return $post_title;
}
add_action('acf/update_value/name=titel','update_acf_title',11,3);
I installed the ACF to Rest-API plugin to get all my fields via JSON but unfortunately I don’t have the page title, which is the most important thing 😉
If you have any others ideas please let me know.
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.