Help trying to echo custom field
Hi there i am setting up a real estate site, i have made a custom field called bedrooms, i want to show the custom field data in a certain place within the loop, is there a way to just show this custom field only? can i echo it somehow <?php echo bedrooms();?>
any help will be greatly appreciated
thanks.
- - - Updated - - -
I managed to find this code :
<?php
if (get_post_meta($post->ID, 'cp_bedrooms', true) != '')
{echo get_post_meta($post->ID, 'cp_bedrooms', true);
}
?>