You didn’t retrieve your 2 values in the save_post action.
You need to get $_POST[’freebie-demo’] (it’s ok for it) and $_POST[‘freebie-downurl’]
If you want an array post meta value based, you can do something like that :
// Sanitize user input.
$de_url['name'] = sanitize_text_field( $_POST['freebie-demo'] );
$de_url['url'] = esc_url($_POST['freebie-downurl']);
// Update the meta field in the database.
update_post_meta( $post_id, '_demo_url', $de_url );
Hope it will help you !
Related Posts:
- Unable to get Preview of Uploaded image within a Custom Meta box
- WP Custom Fields Metabox Disappears – ACF plugin issue [closed]
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- Where are custom field values stored in the database
- Custom field/meta populated by dropdown of existing posts?
- What is the index [0] for on post meta fields?
- Individual Widgets per Page
- Gutenberg add a custom metabox to default blocks
- ‘Preview Changes’ for custom meta boxes?
- Using TinyMce with textareas in meta boxes on custom post types
- add meta box – custom field : which to choose?
- Advanced Custom Fields – Get custom fields from parent page
- Add custom field to the archive page?
- Add metabox to document tab in gutenberg
- How to add add_meta_box to specific Page Template?
- Matching Serialized Arrays with meta_query
- Custom field metabox not showing in back-end
- How to position a custom field before the editor
- How to hide meta box values from custom fields list?
- Adding another state (spam, reject, approve) to wordpress comments?
- Display post_object content using Advanced Custom Fields plugin
- Remove old custom field after import
- Arrange custom fields with drag and drop?
- How can I avoid re-inventing the Custom Fields wheel in my Plugin’s Metabox?
- Using media-upload.php to upload mp3 via custom fields
- extend Meta Box / Document Panel
- Add custom option to Standard Page Attributes Meta Box
- How to store the value of a custom field dropdown select for post referencing?
- Add multiple images to a page sidebar
- Retrieve custom fields on Categories, using WP-API
- Only show metabox when date-value in other metabox is over?
- Custom Meta Boxes: Store two values in one repeatable field
- Order by custom field date?
- 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?
- Change content before writing to database
- Use Custom Post Type as Custom Field
- How to load php file for specific page in admin?
- How to set default metaboxes on user creation?
- Metabox nonce PHP notice
- Order Custom post type loop by custom field (datepicker)
- 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)
- Problem in custom meta boxes
- Using Custom Function With Advanced Custom Fields
- Multiplile values checkbox or select in custom meta box
- Create custom field key upon theme activation
- automatically set “Featured Image” the same as the og:i that is set in a custom field
- Copying Custom Meta Values from existing post to a duplicate post
- Calculate the sum of certain the_sub_fields
- Adding a custom field or metabox to the post-thumbnail widget?
- Displaying Custom Fields on Post with Genesis Child Theme
- Custom fields to save multiple values
- How do I add custom_meta_box_id’s value?
- Undefined index error when saving content on metabox
- How to save multiple metaboxes?
- Metabox with multiple fields added by user and upload box
- add meta box using function.php
- Metabox image upload and custom field
- Unable to show ACF’s Image Custom Field properly in Genesis Framework [closed]
- Login & Register & Custom details WITHOUT plugin
- Send Multiple Custom Field Values Through the URL
- all tincymce’s switch when updating page after changing from html to text in custom metabox
- My metabox class
- wp_handle_upload error “Specified file failed upload test” but still creates attachment?
- How to construct multiple meta boxes
- ACF won’t load from a custom JSON location
- Loading scripts to the Post Edit page only
- Force hide custom field metaboxes
- Woocommerce with metabox plugin
- wp_editor removes paragraph from custom meta box
- How to Display Custom Meta Box only on Specific Page IDs
- Show ACF fields only on certain page in the backend
- Update posts after populating ACF field value [closed]
- How can I pass a variable set by ACF to header.php?
- Metabox will not save
- Transfer self made functions.php custom fields to Advanced Custom Fields [closed]
- How to check for specific meta box value on front end and output accordingly
- Where did the Add New Custom Field go?
- ACF: How to get the full field name (meta_key) by a field key?
- Dynamically fill a post custom field with post publish date
- How Meta Data is different from Custom Fields of POST/PAGE in WordPress
- How can I store a file in the database in the same way WordPress and ACF do?
- Will loading too many ACF Fields cause slow down?
- Admin meta Image Path
- Tweak Meta for Post to work it for Pages also
- Odd PHP Code To Display HTML Of Meta Box [closed]
- custom field not saved
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- Create Multiple File Upload Metabox in WordPress
- WP_User_Query pulling ACF to loop
- Users Select inside custom metabox
- Custom Metabox Not Saving
- Better Method for Multiple Meta Boxes
- how to fetch the meta field keys/meta boxes from a post type?
- How to Create Dynamic Fields in a Meta Box?
- Set front page option using custom fields?
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?