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]
- Where are custom field values stored in the database
- 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?
- How to position a custom field before the editor
- Adding another state (spam, reject, approve) to wordpress comments?
- Add multiple images to a page sidebar
- Retrieve custom fields on Categories, using WP-API
- 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?
- 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
- 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)
- automatically set “Featured Image” the same as the og:i that is set in a custom field
- Displaying Custom Fields on Post with Genesis Child Theme
- How to save multiple metaboxes?
- 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]
- 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
- How can I pass a variable set by ACF to header.php?
- Metabox will not save
- 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?
- Better Method for Multiple Meta Boxes
- Unsaved changes in metabox inputs not detected in the block editor
- How to schedule a custom field value update?
- Add new image block, set default class name and update it using Javascript
- WooCommerce – Adding Custom Fields To Invoice
- 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
- How to list Category list in ACF Pro’s Select Field to choose from [closed]
- Singleton Custom Field (Meta Box)
- Get all the posts where meta field with multiple choice has several values checked
- Custom metabox not displaying multiselect data in edit mode
- How to validate select field in post meta?
- Querying posts by latitude and longitude to build a Google Maps with several markers
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- 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
- ul list with only as many li’s as filled custom fields
- Displaying pages with a specific custom meta
- Let Users Filter Posts by Custom Fields
- Filter posts by custom field (Advanced Custom Fields)
- 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
- Displaying an ACF list of users
- ACF Plugin How to make the customer add more fields in the post?
- Custom metabox not working
- How to get custom image field of specific post id
- Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?
- How to Convert Custom Fields from Text to Array?
- WP E-Commerce Custom Meta > Serialized array
- How To Save Data From Remote APIs To ACF?
- comments_where Hook
- show a specific metabox dependent on the page template
- Problem with revisions only returning four results
- 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
- Add forms dynamically in admin pages?
- Is there any way to make a custom field for a post only if the author is a certain user?
- How can I ‘check’ the “custom fields” box from the Screen Options?
- adding autosave feature to custom fields
- ACF – Compare user and post data
- How to add content with a filter when there’s no content in the editor
- If metabox fields has content display content
- Query Posts based on custom field value
- Append custom field items to content from plugin
- Display Data From This Custom Media Upload Meta Box?
- When post is updated, custom metadata in text area field is overwritten
- Display Child Page with custom fields within Parent Page
- Call the latest posts from a custom field group to be displayed on front-page
- Fetch data from a WP page with same name as current username
- Can i categorise my meta box?
- 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
- How to get the value of particular get $meta value in wordpress
- Adding custom field to an array
- Add image custom attribute [closed]
- save all acf options in one meta_value [closed]
- Best way for managing images of ads banners
- ACF in radio button cf7