Support

Account

Home Forums General Issues Update a field when post is created

Solved

Update a field when post is created

  • I have a CPT called House which includes an ACF text field: user-email

    I also have an ACF User meta field: house-id

    When a user creates a House post I need to update their user meta field: house-id with the ID of the post they created

    How would I do that?

    Thanks, Richard

  • Hi Richard,

    This might be some help:
    updating-user-meta-on-save-post

    You’ll be looking at creating a function that uses the WordPress save_post hook, more info on that here.

    Not a complete answer I know, but it’ll hopefully give you some direction.

    Cheers, Dan

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

You must be logged in to reply to this topic.