For anyone else looking for guidance on how to do this, I created another custom field called event_status and by using the save_post action in wordpress set a condition that once this changes to then the run delete_post_meta action as follows:
function event_status_is_updated($post_id){
if(get_post_meta($post_id,'event_status',true)=='not_complete'){
delete_post_meta($post_id,'date_dun');
}
}
add_action('save_post_event','event_status_is_updated');
Related Posts:
- Is there anything like admin_notices for front end?
- How to use nonce with front end submission form?
- How do I fetch the static front page using the REST API?
- How to display TinyMCE without wp_editor()
- Stop/Pause WordPress Heartbeat using Javascript
- Publish pending article from front end with a button?
- Deleting users from front-end with wp_delete_user()
- add_editor_style is not loading in frontend. Any solution?
- Prevent empty Post Title on form submit via front end post (wp_insert_post_)
- WordPress as a backend only. How to output database content on public side without WordPress?
- Listing registered scripts
- Modify front-end delete button to publish pending posts
- Add Media has stopped working in the front end since 4.5 update
- Redirect after successful registration with fronted registration form
- wp_editor doesn’t work in front end area
- Frontend tagging for both default and custom post type in wordpress
- Saving and displaying content on front end with wp_editor
- Why is the Ajax heartbeat included in my cached frontend pages? Is it OK to get rid of it?
- Uploading video to google drive via frontend [closed]
- I am having a problem with form updating/editing WordPress post on the frontend
- How to attach a uploaded video to post from front end
- Uploading avatar from the frontend
- Replacing textarea with wp_editor
- frontend user with custom profile pages
- ACF: Only get first row of a Repeater Field
- Why is WordPress serving the 1024px version of my image and not the original on a 1920×1080 screen?
- Restrict Login Subscriber users from accessing frontend
- limit file type and file size using media_handle_upload
- RTL/LTR frontend switcher
- Frontend submission upload image via external url
- Delete all children when parent is deleted – frontend
- Front-end delete account in WordPress
- How to set different languages for front-end and back-end
- How to use WP account on third party module
- Simple reservation system for a card game
- How to display images of a post as a media gallery
- Preview post on frontend before submitting it?
- Add a post with react and axios
- How to set up front end editor to autoembed media for non-logged in users?
- How to do persistent data on Front End?
- Can I use plupload multiple queues in wordpress?
- multiple taxonomy select display only one in front end
- wp_update_post via ajax from frontend
- Frontend image uploading from frontend cant handle hebrew names
- br tags on backend not showing up on frontend
- Redirect after delete post in Frontend
- Front end ajax user login session issue
- Why insert post function do not set the modified author without administrator panel?
- Creating a blog on my companies new website using WordPress but I have sidebar issues
- WordPress Backend Fine, All Themes Return a Blank Page?
- Excess dependencies
- Create and send a newsletter from the front-end
- create front-end users post list by specific category
- Front end post editor which is actively developed
- Get Post ID after front end post submission
- Check for uploaded file type wordpress way for multiple uploads
- “GET / HTTP/1.1” 304 186 “-” inside access_log for a WordPress site, but the admin side works
- wp_editor removes HTML and inline styles
- select box not checked and is not saved
- How to add correct Last update in Postings (the_modified_time)
- Front end posting
- Front end posting, not working wp_redirect with ‘cannot modify header information’ error
- Front-end registration form with password field
- Categories from front-end, checkbox selection doesn’t work
- Plugin: Front-end Editor – User role specific editable content?
- Push Contact form 7 variable to front end after submission
- Creating plugin with front-end pages
- How to use jQuery(…).material_chip inside WordPress?
- How to upload Web-record Base64 Wave Audio file in WordPress Post (front-end form)
- How to update the children of a post?
- Frontend registration form doesn’t save data only redirects to wp-login
- Admin Bar – Customizer Label Change
- How to add a new button on post
- Don’t open edit post link in new tab
- How to change custom post order ASC/DESC menu_order wise dynamically?
- Getting values from database with delay
- WordPress Front end editor
- Front end post submissions do not get submitted in the category
- How to set up an auto delete post?
- echo wp_editor to screen with formatting
- AJAX doesn’t pass variables to the php function in the plugin
- upload file with front-end submission and forward the data in an email
- Working on fixing wp-front-end-editor, encountering undefined index
- Missing items on page
- User driven content problems
- updating meta_key from the frontend
- Front end login form not working on live site
- WordPress User Frontend Editing Custom Fields
- How to update post’s featured image in front-end
- Create post from form with image
- Front End Editor
- Setting field not saving on front-end
- Static html/css/javascript front end connected to WordPress
- How to improve wordpress site creation process to increase productivity.
- What is the best way to disabled front-end when using WordPress has headless?
- Remove Unwanted Font Files from Loading into WordPress Frontend
- User Attach Images To Post From Front End
- Putting landing page made with nextjs on wordpress website
- Frontend redirect after delete post in wordpress
- Checkboxes showing on the backend, but not on the frontend?