WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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'); ?>/>


share|improve this answer
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 – Stratboy Apr 12 '13 at 8:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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