How to get related post id using only a custom field value?
-
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!
- The topic ‘How to get related post id using only a custom field value?’ is closed to new replies.