Using a Checkbox Custom Field with Flutter

Discussion in 'Blogging' started by kelp, Jul 24, 2008.

  1. #1
    I have gotten the custom fields where you enter in a value to work, but I cannot get the custom fields with a checkbox to work. Currently I have an option where you can either check or uncheck a box if you want the words "Free Shipping" to display on the page, but I am using the following code, and it always says free shipping:
    <?php if ( get_post_meta($post->ID, 'shipping', true) ) { ?>
    <p class="freeship">Includes Free Shipping!</p>
    <?php } else { ?>
    <?php } ?>

    See, I'm trying to use an if, then statement to make the free shipping display if the checkbox is checked and not to display anything at all if the checkbox is not checked.
     
    kelp, Jul 24, 2008 IP