I can find some little example on using multiple checkboxes, but no one about using a single checkbox in a wpalchemy metabox. Anyone can help me please?

No docs about this topic on the wpalchemy site..

Thank you


WP Alchemy comes with example files that show the usage of virtually all field types;


<?php $mb->the_field('cb_single'); ?>
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="abc"<?php $mb->the_checkbox_state('abc'); ?>/>


  • I already tried this approach but didn't work. I'll try again. But also some WPAlchemy_MetaBox class undocumented methods seems to be useful for this and don't work or I'm not able to make them work for some reason. For example, the_checkbox_state, get_the_checkbox_state and is_selected don't work properly in my context. Don't know. Also I'd really like to understand what some constants are used for. For example: WPALCHEMY_FIELD_HINT_CHECKBOX and WPALCHEMY_FIELD_HINT_CHECKBOX_MULTI – Luca Reghellin Apr 12 '13 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.