Hi all! I have a question. I set up custom press with the directory plugin. I set a custom field asking a yes or no question and depending on the answer (either yes or no) I want to either display an image or not. So this is the code I have so far:
if (get_post_meta($post_id,’ct_Digital_Pr_text_492a’,true)) {
echo “<img src=”ins/wp-content/themes/ins/images/digitalPrinter.jpg” width=”27″ height=”28″ alt=”” title=”Digital Printer Available” />”;
echo get_post_meta($post_id,’ct_Digital_Pr_text_492a’,true);
}
else if (get_post_meta($post_id,’ct_Digital_Pr_text_492a’,false)){
echo “”;
}
That doesn’t work because it displays the image because it’s always set to contain something. So it can never be false… How can I set it up so that it displays the image depending on the value?
Hope that makes sense! Thanks!