Support

Account

Home Forums Backend Issues (wp-admin) Replacing custom post type post title with an acf? Reply To: Replacing custom post type post title with an acf?

  • HI @Elliot, and thanks for your reply.

    the ‘get_field (‘member_firstname’) does not seem to recall the field, when used inside this function… the rest works perfectly :
    – composing the $new_title & slug;
    – update of the wp_post with $post_id, – of course W/O the “member_firstname field value…!-:

    $my_post = array('ID'=> $post_id,'post_title' => $new_title,'post_name' => $new_slug );
    wp_update_post( $my_post );

    Another related question is how do I proceed to call this hook / function when / if the fieldset is updated (as opposed to just ‘created’) to reflect the change in member_last / firstname should these fields be changed?