admin管理员组

文章数量:1406060

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

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 asked Apr 11, 2013 at 15:40 Luca ReghellinLuca Reghellin 1,6422 gold badges21 silver badges45 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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

Example;

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

https://github/farinspace/wpalchemy/blob/master/wp-content/themes/mytheme/metaboxes/checkbox-meta.php#L9

本文标签: how to use a single checkbox with wpalchemy