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,
    stupid mistake !
    So I got the 2 below hooks / filters below running fine, each returning the proper member_lastname & member_firstname value, one after the other, when I ‘publish the field set.
    At this point the WP_post /Post is created, but needs to be updated with the proper values, ie.
    – for the post_name a slug => member_firstname.”-“.member_firstname;
    – for the post_title => member_firstname.” “.member_firstname;

    add_filter('acf/update_value/name=member_lastname', 'my_acf_update_value', 10, 3);
    add_filter('acf/update_value/name=member_firstname', 'my_acf_update_value', 10, 3);

    So :
    – how do I keep both values from the previous hooks, so that I can use them to build both the above variables ?
    – do I need to build yet another hook to update the wp_post table, & “where / when” should this happen ? I guess when ACF completes the publishing / update of the wp_postmeta table ?

    Agin, many thanks for your help on this