Meta Box
Support › General › How to Check if a custom field exists
Hi there
I need to check if a specific custom field exists in general for the actual installation. So if this field exists, I need to get TRUE even if the value is empty.
Thanks for a hint, couldn't find anything online for meta box.
Best regards François
Hello,
You can try to use the function get_post_meta() to get a custom field of a post if it exists. Following the documentation https://developer.wordpress.org/reference/functions/get_post_meta/ https://wordpress.stackexchange.com/questions/165756/show-custom-field-if-it-exists-and-show-different-elements-if-it-doesnt
get_post_meta()