John,
I’m not sure how you have the radio button set up, but WordPress easily handles multiple values in one meta_key. You simply need to place the values in an array before sending it to update_post_meta
. For instance:
$array = array( 'foo' => 'foo_value', 'bar' => 'bar_value' );
update_post_meta( $id, 'my_meta_key', $array );
WordPress automatically serializes this array on the way in and unserializes it on the way out.
My personal recommendation would be to save the two pieces of data as separate pieces of metadata. By serializing the array and sending it to the database, you lose the ability to query for the individual piece of information.
Finally, you should make sure to sanitize/validate your data when saving it to the database and escape it on display. The Codex has a nice article on how to do this: http://codex.wordpress.org/Data_Validation
Related Posts:
- Save an array from drop-down in custom meta box
- Inefficient Query Confusion
- Convert Custom Post Data to Javascript Array for Autocomplete
- CPT and metabox: create multi checkbox by using array?
- Meta-Box to add multiple items one at a time and on publish save all
- Do I need a nonce field for every meta box I add to my custom post type admin?
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- Multiple Custom Metabox Help
- How to force one column layout on custom post type edit page?
- Custom Post Type – Taxonomy Dropdown Menu?
- wp_dropdown_categories in custom post type with custom taxonomy
- How can I add a column/s to wp_posts table?
- How to add multiple images to custom post type?
- How do I remove all the metaboxes for a custom post type?
- How To Set Custom Post Type Title Without Supports
- Creating a Custom Post Types dropdown in a Meta Box
- Find callback function for custom taxonomy metabox
- Remove custom metaboxes from custom post type
- Limit the post for differents custom post type in the same wp_query
- Add pre-existing meta box to new custom post type
- Dynamic page.php template for custom post types
- Add special meta box to custom post type
- Custom field values get deleted
- WordPress metabox file upload in custom post [duplicate]
- Display metabox conditionally
- Adding Custom Metaboxes to Custom Pages
- Save or update data when custom post published
- Custom metabox translation
- How to add multiple featured image in meta box in post editor?
- Timepicker-addon doesn’t show – Datepicker works fine?
- Adding Meta Boxes while Registering a Post Type in a Class
- Metabox Populated with a Custom Post Type – How to Output CPT based on Select?
- Is it possible to create a post using a metabox?
- Custom Post Type Metabox – Not Saving
- Create a post in custom post type using field in registration form after users submit form
- WordPress custom meta field for custom post not storing data
- How to Duplicate (multiple meta box)?
- My theme saves their custom post type’s metadata as a serialized array, how to access the keys?
- List of Posts in a Custom Field
- Add Standard Page Attributes Metabox for Page Parent
- dynamically add a custom field or metabox to custom post type [duplicate]
- Custom date changer post_date => future – missed schedule error
- Getting Custom Post Type Meta on Publish
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- Display post content with respect to its title?
- Adding a metabox on a CPT’s submenu page
- Checking if $_FILE isset for an array of file upload metaboxes
- Ordering values entered in Custom Taxonomies
- Permalinks: custom structure for taxonomy – tags?
- Custom Post Type & Meta Box – Displaying meta box information on front end?
- Sizing textarea field in custom metabox
- Custom Post Meta from custom metaboxes is randomly being deleted
- Custom post-type metabox position
- How to add editable/dynamic values to dropdown of a Custom Post Type Meta Box
- wysiwyg editor don´t export paragraph
- How can I set a meta value that will then affect other post meta values?
- Querying multiple values from a single key
- How to Use Custom Meta Field Instead of CPT Title in Post URL
- link featured image to external link
- Get custom term meta problem on single post type
- Is it possible to sort metabox teaxtarea values?
- wp_editor for custom post type doesn’t save value
- Showing a meta box in a custom post type on a page
- Having Issue on Getting Metabox Checkbox Value
- Multiple wp_editor instances in custom post type using Ajax
- CMB select with data from CPT
- 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
- Add a meta field to the list of results for a custom post type
- List of all posts in one custom post type in the edit screen of another
- Create a custom post type based on ‘Post’
- How do you make relational post types in WordPress? [duplicate]
- Placing Admin Post Metaboxes in Tabs
- Wp Meta Query does not work while simple Query Works
- How to Grab Anime info using Jikan API and fill the value in Metabox
- create a “add icon” field in taxonomies page
- Problem with multi checkboxes value in metabox?
- Getting data from dynamically allocated metaboxes within a custom post
- Using meta boxes as the title of a custom post type
- If custom taxonomy exist on post?
- check_admin_referer not working in custom meta box for custom post type
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- Custom meta box in editor of custom post type not working
- Meta box not saving
- Pulling in Related Posts based on Post Type array
- How to make post page unique and show it on home page?
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Add different meta box based on taxonomy
- Custom sortable pages on custom post type
- Toggle a metabox based on a selection
- Add multiple custom meta boxes to different custom post types
- Custom post type Featured Image popup not working
- Custom Post Type Author Array Problem
- Need to build custom metabox select prev posts by category
- How to bring custom meta boxes to custom post types?
- Customized featured image doesn’t refresh in post admin metabox after upload/insert
- Saving custom metabox data with a twist
- Canot save post if any meta box was empty
- How to consume external API from WordPress post editor and display the response data in the custom field?