You’re looking for delete_post_meta($post_id, $meta_key, $meta_value);
Parameters
$post_id (integer) (required) The ID of the post from which you will delete a field. Default: None
$meta_key (string)
(required) The key of the field you will delete. Default: None$meta_value (mixed) (optional)
The value of the field you will delete.
This is used to differentiate between several fields with the same
key. If left blank, all fields with the given key will be deleted.
Default: Empty
Related Posts:
- Trying to retrieve post meta
- Display custom meta box in my template file
- How to automatically apply woocommerce product title to all product images alt tags?
- How to remove a metabox from menu editor page?
- Why is my custom meta box input not saving
- Add custom field to attachments in a specific category
- How can update custom meta for all posts
- Passing the custom field values in the wp_get_current_user array function
- Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?
- Image media upload metabox
- Linking text within textarea of custom meta box
- Need Help Fixing My Iframes [closed]
- Firing schema via code in functions.php doesn’t work
- 3 Slashes appear after Apostrophe in custom fields after updating product-site
- Which PHP page is the Default Posts Page
- Saving zero in meta box
- Show meta box only for default page template
- Illegal string offset in PHP function
- Find a way to retrive data updated through metabox plugin to web page
- How to check if a PHP string is different than meta field?
- Can’t save php string to a custom field
- How to show/hide php table rows based on the content of custom fields
- Get post meta retrieving wrong value
- Custom meta box values are not getting saved for my custom post type
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- WP All Import / Update stock quantity from multiple XML files
- How to store multiple custom meta box
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- How to add data to a custom field at the wp_users table?
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Warning: call_user_func() expects parameter 1 to be a valid callback, function
- Unable to Call More than One Meta Box Output
- Hide a div when a custom field is empty
- Conditional On custom field plugin metabox
- Display background color or image with custom meta box?
- Meta boxes only displayed when editing normal (default wp post_type) posts
- Delete images from media library when user deletes an image from ACF Gallery
- Updating Metadata with Shortcode
- Add a Metabox checkbox to the Page Edit screen of wp-admin , which only certain roles can see and Makes only certain roles able to Edit said page
- Checkbox doesn’t save inside metabox
- Dropdown category field inside repeatable metabox
- Create shortcode for metabox gallery
- Products listing check if meta checkbox is checked
- Trying to update Woocommerce meta values
- Is it possible to update the dataset using update_post_meta
- Display metabox galleries on specific page template in admin editor
- Block error message in foreach loop when looping through ACF field
- Hide a div if the fiels is empty
- How do I get the value of a current user’s custom field?
- Store custom field’s multiple values in one user meta key
- Get field in readable word
- meta field for numerous links
- Custom fields changes the formatting of metabox input
- Custom meta box save values issues – Deprecated: Function ereg() and more
- custom field meta-box with dropdown/autocomplete
- Display a post based on its metabox selection
- Help with my first Metabox helper class
- If custom field doesn’t exist, or exists and it’s true show title?
- Metabox Input Not saving
- Where can I find the code for the menu page meta boxes?
- How can I create a menu items from meta box based on users input
- PHP Puzzle: Unique Styles with PHP loop
- ACF Date fileds to Age Convert [closed]
- Appending an ACF custom field to the page title
- Warning: Illegal string offset ‘post’ and ‘page’
- How to get meta box labels?
- How to pass value to add_filter wpcf7_form_tag from another function?
- Custom Admin Menu Report for Specific User ID
- ACF number less than comparison not working
- WordPress Infinite Scroll without using any plugin
- New Plugin Review
- How to add SVG icon above product tab title
- WordPress child theme fails to override parent navigation menu in /inc/structure/header.php
- jQuery not defined
- Converting HTML Template to WordPress Theme
- How can I apply_filters from inside a function?
- Populate editor with some content of a page with a page template
- I want to load in a new class but only if the current page is single-movies.php
- Skt full width basic slideshow problem
- Non-Closing PHP Query in WordPress Loop
- Missing a text-domain esc_attr_e
- How to insert data from metabox to custom table
- Extract and display user infromation on an automatically created page
- How can I assign separate stylesheets to different pages?
- Execute PHP code only with specific user role
- PHP function for horizontal Woocommerce thumbnails and badges
- WooCommerce display price before add to cart [closed]
- Show sidebar only to author of post
- how to add custom select field to wordpress edit page
- how to use 2 index.php file One for mobile and one for desktop
- WP post meta – for loop inside for loop
- WP_query meta_query slow with OR and DATES
- Matching multi user
- auto metakey value on post tile
- How do I routinely extract the thumbnail of the most recent post?
- Modify category archive page loop on functions.php
- Showing custom field contents without listing description
- Check if values exists DB
- Why a class property becomes empty?
- Hide category by tag