if post_meta value = X
-
Hello,
I’ve been scouring for a method of doing this and have had no luck.I’d like to display an image conditionally based on what checkbox was selected when setting up a post. Here’s what I’ve tried:
<?php if ( get_post_meta($page->ID, “Color Sorts”, true)==tan) { ?>
and
<?php if ( get_post_meta($page->ID, “Color Sorts”, true)==’tan’) { ?>
But neither work…any help is greatly appriciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘if post_meta value = X’ is closed to new replies.