Custom Field Checkbox with WordPress
-
I have used a plugin to customize the whole write panel, and 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.
-
Afraid you’re in the wrong forum and need to be over at WordPress.org for help. We can’t edit our php here
-
I’m afraid that in order to get support for self-hosted WordPress.org powered blogs you need to head over to the WordPress.org forums.
- The topic ‘Custom Field Checkbox with WordPress’ is closed to new replies.