Check for duplicate custom field value before running wp_insert_post

You can run a WP_query using meta_key and meta_value args

Take a look here WP_User_Query

If the result is non – empty – you know you have a duplicate!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)