The same way you would in any other HTML form
<input type="text" name="name[]" />
<input type="text" name="email[]" />
<input type="text" name="name[]" />
<input type="text" name="email[]" />
<input type="text" name="name[]" />
<input type="text" name="email[]" />
The above will give you arrays instead of singular values in PHP, so $_POST[‘name’] is an array of 3 values.
The same is true of your checkboxes, give them all the same name with a []
on the end. Use post IDs as their values, and you have your data structure, a simple array of post IDs
Related Posts:
- How to add multiple images to custom post type?
- WordPress metabox file upload in custom post [duplicate]
- Save or update data when custom post published
- How to: add option to add more checkboxes on custom post type
- How to add multiple featured image in meta box in post editor?
- how to set default value for checkbox in wordpress
- Adding Meta Boxes while Registering a Post Type in a Class
- How to use TinyMCE Editor for one of my custom post meta field?
- Adding a metabox on a CPT’s submenu page
- Wrap meta boxes & data handling for specific post types in classes?
- Save Multiple Metabox values
- How to insert data into meta box from another plugin?
- Custom Meta Box returns no HTML
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- Creating alternate meta box context locations
- Is it possible to sort metabox teaxtarea values?
- Create a select metabox that the user can pupolate?
- Wp Meta Query does not work while simple Query Works
- Show a custom post title in another custom post type in Meta box
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- Getting data from dynamically allocated metaboxes within a custom post
- Admin metabox with custom post type dropdown option not update choosed input after saving
- php output of generated custom metabox
- Custom meta box in editor of custom post type not working
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- How to consume external API from WordPress post editor and display the response data in the custom field?
- Remove tabs from media uploader for a CPT
- Is flush_rewrite_rules necessary when creating a custom post type? Why?
- Priority of Meta Box for Custom Post Type
- Unable to filter on field on edit.php page
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- How to save the checked boxes?
- add_meta_box: Datepicker like the one for postdate?
- Using posts and postmeta table to store custom Address Book Plugin data
- Custom Post Type Meta Boxes
- template_redirect not working, apparently for no reason
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Using WPAlchemy metabox values in another metabox
- Custom Post Type | Fatal Error on register_post_type()
- Dynamically add / duplicate custom meta in custom post types
- Custom Post Type rewrite
- Admin notice not displaying
- How can I create a custom meta box to add an mp4 video to a page?
- Pull a post based on a meta value in a custom post type
- Change meta box when the page’s template is changed
- Undefined Variable – Custom Post Type Meta
- custom post type not showing in menu
- Adding a custom post type taxonomy template in plugin
- Plugin: register custom post types, child ready and performance best practices
- Getting meta in editor plugin, and event triggering issue
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Repeatable Fields Metabox with Textarea (or wp_editor)
- pre_get_posts for custom page builder meta box
- How to make custom taxonomy into drop down select in a custom metabox
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- Using POST method in meta box, no results
- Add additional field to custom post_type
- Create metaboxes based on custom post type
- What’s an efficient way to change the post status of many posts at once?
- How to Echo Metadata Value in Currency Format
- Problem with $post_id object’s property
- How To Display A List Of CPT Posts In A Meta Box On Menus Page?
- populate array with posts
- How exclude or skip post type with get_next_post_link
- CMB2 metabox create select with list of post from CPT
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Types plugin custom post add_action hooks
- Query Custom Posts – Add To Selection
- How to sum values from all custom posts metabox
- Not Able to Add New Class To CPT Attachment Image
- Saving a Custom Post Type with a Meta Box results in a “Updating Failed” error
- Adding accordion-section to custom post type edit screen
- Orderby custom fields is not working
- I’m having trouble with Related Product “tax_query” ‘terms’ value
- How to stop the custom post type URL from the google search?
- Changing CPT permalink
- Get all posts by many custom post types
- Create Post Types from a XML url (Real Estate website)
- wp_editor in custom post type is not saving formatted text like bold, italic etc
- Warning , Use of undefined constant PLUGIN_PATH?
- Error when moving custom post type to bin
- Having issue on Loading Meta Data From CSV to CPT
- custom data model – link and populate from admin backend
- Dropdown of existing posts in a metabox
- call a function when insert and update a custom post type
- do action inside a class is not working
- Registering an optional custom post type from a plugin
- How to add a custom meta box below publish box in CPT that is like publish meta box and can contains html?
- Edit post meta direct from post.php?
- Generate custom RSS from a plugin
- How to Arrange Support => Thumbnail
- Custom metabox value not saving
- loop through custom post-type with two meta_keys
- CPT Template Option to Top
- Use a Variable in update_post_meta as the $meta_key
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- Custom Post Type urls not working
- Just the First Metabox what saves the data!
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs