In his answer , Jan Fabry made a brilliant solution, but it saves the values one by one (for each his own field )
for your question, we need to “reverse” that , but it is actually easy .
BEFORE lines 409-413 , Jan Fabry made an if-else clause to seperate values into fields and save / update. we do not need it .
Instead , we take the already constructed array and save it as a whole.
so you just need to add this instead of the whole bigger clause (and do not forget to drop the ELSE:
if ( 'multicheck' == $field['type'] ) {
// If it is a multicheck , implode the array and get a string...
$new =implode(",", $new);
}
That´s all .
and do not foget to thatnk JAN Fabry for it – not me 🙂
Related Posts:
- Adding another state (spam, reject, approve) to wordpress comments?
- Problem in custom meta boxes
- Better Method for Multiple Meta Boxes
- I need a “Choose from existing content” popin
- How can I hide custom field from users used for caching response from external api?
- Let’s Create Custom Field Template Documentation
- MetaBox not saving after empty
- Custom meta boxes not saving
- Meta Box Plugin Cloned Fields – Multiple Foreach values
- Make separate text boxes for separate WordPress Custom Fields
- Save input form on custom field
- When post is updated, custom metadata in text area field is overwritten
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Individual Widgets per Page
- Using TinyMce with textareas in meta boxes on custom post types
- How to add add_meta_box to specific Page Template?
- Add custom objects/entities to WordPress
- extend Meta Box / Document Panel
- Filter results with custom field values and dropdown
- Is there a way to do multiple ordering on a multiple meta_query?
- Populating meta box with select-list of existing posts, and assigning it to custom post types
- Create meta boxes that don’t show in custom fields
- How To Create a Metabox of HTML Content with Instructions For Editors When Editing a Post or Page?
- How to load php file for specific page in admin?
- How to set default metaboxes on user creation?
- TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2
- wp_editor in add_meta_boxes does not show gallery
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Adding Properties to User Profile and Displaying in List
- Create custom field key upon theme activation
- ajax delete value from custom field array
- How do I read the value of a custom field of the page?
- How to save multiple metaboxes?
- add meta box using function.php
- Metabox image upload and custom field
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- all tincymce’s switch when updating page after changing from html to text in custom metabox
- How to construct multiple meta boxes
- Force hide custom field metaboxes
- Insert attachment ID in custom field from media uploader
- Metabox will not save
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- Custom Taxonomy to dropdown box on adminside wordpress
- custom field not saved
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- query usermeta from custom field
- custom avatar removal
- WP 3.1 meta_query for multiple custom field values
- Unsaved changes in metabox inputs not detected in the block editor
- Send email with custom fields after new draft is saved or new post published
- Button inside Custom Meta Box triggering the Update Button
- How can you include custom post meta in search without calling each key?
- When creating a metabox do you have to create DB fields for the data?
- Specific coditional usage [closed]
- Set checkbox as checked by default in a metabox
- Singleton Custom Field (Meta Box)
- Custom metabox not displaying multiselect data in edit mode
- How to validate select field in post meta?
- Check & remove special characters in a field?
- Is it preferable to use custom code to create metaboxes instead of plugins (such as ACF) and if so why? [closed]
- How add multiple wp_editor_box to new post
- Displaying pages with a specific custom meta
- How to validation for sanitize_URL?
- How can I output the custom fields wrapping with HTML
- put saved metabox values back into fields and then display on the front end
- HM CMB: Role Select
- How to get all custom fields with some prefix in key?
- Custom metabox not working
- Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?
- WP-eComerce Advance Meta Tag data in descending order [closed]
- How to Convert Custom Fields from Text to Array?
- WP E-Commerce Custom Meta > Serialized array
- Adding re-type email and check it if the email match
- Counting post fields
- show a specific metabox dependent on the page template
- Making custom meta box required (with error message if not filled in) on Gutenberg
- HTML for adding a meta box (basic text field) to page editor?
- Adding text box with add_meta_box
- Adding an option to post editor to show a site disclaimer or message
- Add forms dynamically in admin pages?
- How can I ‘check’ the “custom fields” box from the Screen Options?
- Remove Custom metabox from particular page template is used
- Append custom field items to content from plugin
- Display Data From This Custom Media Upload Meta Box?
- Call the latest posts from a custom field group to be displayed on front-page
- custom field functionality
- How to add an option to admin to add image that could be used as header?
- Show or hide lang=”ur” in main element
- Can i categorise my meta box?
- Adding thumbnails for non-image attachments
- Where can I find the code for the menu page meta boxes?
- When editing a post with a custom meta box the values aren’t displaying correctly
- Use Metabox to enter Post Title
- Include custom fields into the content of a regular page
- I would like to display different text on different pages
- How to get the value of particular get $meta value in wordpress
- Add image custom attribute [closed]
- Check if a field is capitalized?
- Problem display
- Add fields to edit in custom widget