Support

Account

Home Forums Backend Issues (wp-admin) Save profile data to a cpt

Solved

Save profile data to a cpt

  • I have extended the user profile with some acf fields, it is working great! Now, I would like to upon save the users profile, a cpt post should be created or updated.

    I know how to do the inner logic… I think, but I don’t know which function to hook into. Examples that I’ve found uses acf_form(), but I cannot see how I can hook into that and run a wp_update_post.

    Anyone with suggestions to push me in the right direction?

  • You want to use acf/save_post.

    The post id passed when updating a user will look like “user_{$user_id}”

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.