• I’m using WPAlchemy, What I’m trying to do is have check boxes with labels from a custom post type posts.

    In other words, is it possible to replace ‘a’, ‘b’, ‘c’ in the array with the titles?

    <?php $items = array('a', 'b', 'c'); ?>
    
    	<?php while ($mb->have_fields('cb_ex', count($items))): ?>
    
    		<?php $item = $items[$mb->get_the_index()]; ?>
    
    		<input type="checkbox" name="<?php $mb->the_name(); ?>" value="<?php echo $item; ?>"<?php $mb->the_checkbox_state($item); ?>/> <?php echo $item; ?><br/>
    
    	<?php endwhile; ?>
  • The topic ‘WPAlchemy, dynamically create check boxes from custom posts titles’ is closed to new replies.