• Hi guys – can’t figure this out for the life of me. Here’s what I’ve got:

    <?php if (get_post_meta ($post->ID, "apples", $single = true) || ($post->ID, "oranges", $single = true) || ($post->ID, "bananas", $single = true)) { ?>
    IF FRUIT EXISTS, SHOW THIS
    <?php } ?>

    So I want to just show something IF ANY of the custom fields have value.

    With this code, I’m getting Parse error: syntax error, unexpected ',' this is inside a get_posts loop.

  • The topic ‘if custom field 1 OR custom field 2 has a value, then…’ is closed to new replies.