How to check for a custom field and do something:
<?php
$number = get_post_meta($post->ID, 'number', true);
if ( $number ) {
echo 'there is a custom field value';
}
else {
echo 'no custom field value';
}
?>
Revisions
There are no revisions for this post.
No comments yet.