Skip to content

Instantly share code, notes, and snippets.

@farinspace
Created February 11, 2011 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farinspace/822101 to your computer and use it in GitHub Desktop.
Save farinspace/822101 to your computer and use it in GitHub Desktop.
<?php $pages = get_pages(); ?>
<?php while( $mb->have_fields_and_multi( 'buttons' ) ) : ?>
<?php $mb->the_group_open(); ?>
<div class="button">
<a href="#" class="dodelete button">Remove</a>
<?php $mb->the_field('s_field'); ?>
<select name="<?php $mb->the_name(); ?>">
<option></option>
<?php foreach ($pages as $page): ?>
<option value="<?php echo $page->ID; ?>"<?php $mb->the_select_state($page->ID); ?>><?php echo $page->post_name; ?></option>
<?php endforeach; ?>
</select>
</div>
<?php $mb->the_group_close(); ?>
<?php endwhile; ?>
<a href="#" class="docopy-buttons button">Add</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment