Support

Account

Home Forums General Issues If a checkbox value is checked Reply To: If a checkbox value is checked

  • I have radio buttons set up with three options:

    Forthcoming
    In Stock
    Out of Stock

    These are set up to run on a custom post type, ‘Book’

    I want to output something different depending on which option is checked.

    This all takes place within the loop.

    I don’t have any code relevant to the issue to show I’m afraid. I had previously used a single checkbox and called it as follows:

    <?php if ( get_post_meta($post->ID, 'paperback', true) ) : ?>
    	Paperback
    <?php endif; ?>

    This worked fine, but I don’t know how to query the custom field AND the option selected, which is the problem here.

    I hope that’s a bit more clear, sorry I can’t provide more!