Custom Field Checkbox with WordPress [Flutter]
-
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.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Custom Field Checkbox with WordPress [Flutter]’ is closed to new replies.