[Custom Fields] Check if any post has the exact same custom fields values
-
Hi all,
Here’s what I’m trying to do:
Say I use 10 custom fields when publishing a post. All 10 are always assigned a value.
I want to have users insert new posts with wp_insert_post().
The user fills in all 10 custom fields and hits submit.For the post to get submitted, I want to check within all posts on the site IF there is any other post that contains the exact same values for those 10 custom fields.
This is a personal project I’m attempting and it’s basically a sort of classifieds ads where I need to check if the exact same ad was already posted, so people don’t spam the site submitting the same ad multiple times.
Hope I wasn’t too confusing ??
Thanks,
Cosmin.
- The topic ‘[Custom Fields] Check if any post has the exact same custom fields values’ is closed to new replies.