So the solution after much cursing and pulling of hair was to ditch the WP_Query and go with get_posts instead, while referencing post_title
like so:
<div class="my_meta_control">
<p>Add or subtract Athena projects related to this project.</p>
<label>Available Projects</label><br/>
<?php
$args = array('post_type' => 'athena_project', 'posts_per_page' => 1000);
$items = get_posts($args);
$mb->the_field('item', WPALCHEMY_FIELD_HINT_CHECKBOX_MULTI);
foreach ($items as $item) { ?>
<input type="checkbox" name="<?php $mb->the_name(); ?>" value="<?php echo $item->post_title; ?>" <?php $mb->the_checkbox_state($item->post_title); ?> /><?php echo $item->post_title; ?><br />
<?php } ?>
<br />
<input type="submit" class="button-primary" name="save" value="Save" />
</div>
Now everything works beautifully.
Related Posts:
- How can I output WPAlchemy repeating fields meta values in my page template?
- Custom post type, have only my meta boxes
- Display Repeatable Meta Box Content
- Use remove_meta_box conditionally on custom post type
- create custom meta box with default value
- Can I restrict category availability?
- Create metaboxes based on custom post type
- Displaying a div from an assigned meta_value when on a page
- Custom post-type metabox position
- How to Echo Metadata Value in Currency Format
- Issue on Working with Metabox – Checkbox to enable Sale Items
- How to add editable/dynamic values to dropdown of a Custom Post Type Meta Box
- Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”
- Problem with $post_id object’s property
- How To Display A List Of CPT Posts In A Meta Box On Menus Page?
- What do the numbers mean at the end of add_action(‘save_post’)…?
- Saving Meta Data within Custom Post Type
- A meta box (in a custom post type) with two different type of fields
- populate array with posts
- Using custom post type as taxonomy
- wysiwyg editor don´t export paragraph
- How to make a meta box?
- Retrieving meta-box from a custom-post-type
- Forms and WordPress Nonce
- How can I set a meta value that will then affect other post meta values?
- Why do I have to press the “Update” button twice to save my meta box values?
- Inefficient Query Confusion
- Create a custom post type for a photo post
- Prevent custom post type from showing up in custom menus
- How to insert data into meta box from another plugin?
- Unable to display selected post title in frontend from metabox wp_dropdown_pages()
- Values from meta-box not on $_POST
- Custom Meta Box returns no HTML
- Metabox multiple custom post select -> display selected items?
- Topic won’t save for a custom post type — how to debug?
- Custom post type suddenly stoped working after WordPress 5 update
- Get id from metabox dropdown
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- CMB2 metabox create select with list of post from CPT
- Display metaboxes if checkbox ir marked
- Custom posttype content metabox
- link featured image to external link
- Removing numerous Meta boxes from numerous CPTs
- Reusable metabox backend and frontend
- Odd behaviour for the update button when displaying a WP_List_Table
- Get custom term meta problem on single post type
- Filter posts of custom post type by meta key in (List All Section)
- Creating alternate meta box context locations
- Is it possible to sort metabox teaxtarea values?
- Create a select metabox that the user can pupolate?
- Display custom meta on page that has been check in custom post type
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- wp_editor for custom post type doesn’t save value
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Showing a meta box in a custom post type on a page
- Having Issue on Getting Metabox Checkbox Value
- Save Metabox Custom Field Value
- Meta box data not saving
- saving dropdown menu data on custom post type
- Custom meta box in custom post type not working
- Set Default Option Value as Blank for Meta Box
- Multiple wp_editor instances in custom post type using Ajax
- WP_Meta_Query object with conditionals
- Questions regarding add_meta_box()
- Meta box not appearing in my custom post type
- Related posts meta_query CPT
- Meta box with front-end styling
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Cannot Save MetaBox Data in Custom Post Type
- Adding an extra parameter [string] to my posts’ permalink?
- Custom post type meta box empty after save
- Query Custom Posts – Add To Selection
- How to add a class to meta boxes (to customize them in CSS)?
- CMB select with data from CPT
- I can’t connect my custom jquery to wp admin
- Saving meta box data?
- Problem On Retrieving Post Meta Data on Custom Column [closed]
- Updating post content and custom fields in edit post screen
- Add a class to post_class if more than one post shares same meta_value_num
- Function to return values from metabox
- Invalid file type when using wp_upload_bits to upload PDF to a custom post type
- Add a meta field to the list of results for a custom post type
- Metabox does not show in custom post type
- Empty meta-box returns publishdate if no value is set?
- Saving metabox keys and storing values as array
- using the loop in custom meta is messing up ‘add new’ post type
- Custom Post Type Meta Box Text Input Field Won’t Save When Blank
- Custom MetaBox : Food Menu Item Available Dates
- how to compare different timestamps in wp-query for events custom post types?
- How to sum values from all custom posts metabox
- List of all posts in one custom post type in the edit screen of another
- One Custom Post Type two different Templates
- Select Venue from dropdown list and reuse stored address information in meta_box
- Custom Meta Box with variable number of fields
- Create a custom post type based on ‘Post’
- How do you make relational post types in WordPress? [duplicate]
- Include a metabox in the ‘home’ screen of a custom post type? If not, then the dashboard page?
- How to recover the post ID earlier in the WP admin hook action “firing” sequence?
- Placing Admin Post Metaboxes in Tabs