if meta value selected
-
I’m using a select list meta box and want to be able to check the value and if a certain value is present do one thing and if not, do another. I’ve done this with a simple text box a million times, but can’t get it to work with select. If it was just a text field I’d do this:
<?php if(get_post_meta($post->ID,'select-name', true)): ?> DO THIS THING <?php else: ?> DO THIS THING INSTEAD <?php endif; ?>
I think I have to check on the key first, and then the value, but haven’t had much luck with the things I’ve tried.
Any help appreciated + Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘if meta value selected’ is closed to new replies.