I wish to use a function which is run only when a specific custom field is available.
if (custom_field_x_exists("name_of_the_custom_field")) :
<Do some things>;
How might it be done?
I think this should help
if ( get_post_meta( $post->ID, 'name_of_the_custom_field', true ) ) :
// Do something
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
4 years ago