Home Forums General Issues Update a field when post is created


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:

    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.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.