Accessing data from a custom drop down field
Hello,
I'm having a problem getting a drop down menu to work and I was wondering if someone could help me out.
I have a custom drop down field called 'cp_cat' with options of 'yes' and 'no'.
The value is set to yes but when I view the post it is showing no. Here is the code:
Code:
<?php if (get_post_meta($post->ID, 'cp_cat', true ))
if($value == 'yes') {
echo 'yes';
}
else {
echo 'no';
}
?>
Any suggestions?