Forums

How to get related post id using only a custom field value? (1 post)

  1. cscscs
    Member
    Posted 1 year ago #

    I would like to update a post via the update_post_meta function. The only problem is that I don't have the post ID in this case but I do have a unique value of a posts custom field from a csv file that I'm importing.

    In short, how can I do a query for a custom field containing X and return the related post ID for use in a variable?

    Thanks in advance for any help!

Topic Closed

This topic has been closed to new replies.

About this Topic