Support

Account

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.