Accessing data from a custom drop down field
-
Hello,
First time poster, I hope I have this the right location… so here goes:
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 the text is showing no. Here is the code:
<?php if (get_post_meta($post->ID, 'cp_cat', true )) if($value == 'yes') { echo 'yes'; } else { echo 'no'; } ?>Any ideas?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Accessing data from a custom drop down field’ is closed to new replies.