You could for example save an error flag to a transient in save_post, if a required field is empty, and the display the admin notice based on the transient. This concept is demonstrated in in this old answer.
Another option is to add a simple script to the editing view which would alert the user that the said field is empty. Or just add required html attribute to the input field.
Related Posts:
- Wp_update_post: Infinite loop even with remove_action solution, OOP
- trigger save_post event programmatically
- Is it possible to save/modify a post without calling the “save_post” action hook?
- Returning ACF custom field from publish_post
- How to check what kind of saving it is?
- Firing a function AFTER redirect
- How to catch and modify custom field values when a page is updated
- How to change image atributes right before an image to be saved?
- Conditional for autosave or auto draft?
- save_post hook to add terms getting deleted when using bulk edit
- ‘save_post’ hook not working in WP 3.5
- Block Update Profile Errors
- Add action save post when create and publish
- remove_action(‘save_post’) in function that was triggered by save post not working
- Problem with call_user_func_array front end
- set_post_format called after wp_update_post when using bulk edit?
- WordPress save_post hook not firing when checking if _GET[‘post’] is set
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- How to use the password_reset hook to validate new password and display error
- How do I set a custom post type Category after import using wp_set_post_terms
- update ACF field when saving post on back office
- How to hook update_post_meta and delete_post_meta?
- Are there any hooks that alter the 404 logic?
- Use wp init hook to call other hooks?
- Add_action to wp_head via functions.php
- Hook that fires when admin setting is saved
- What is the difference between update_post_meta and update_postmeta hooks?
- Hook on trash post
- How to remove action hook done in a plugin from functions.php in my theme?
- Hooks for trashing, deleting, saving, restoring custom post type
- Implementing advanced add_* function wrappers
- My add_action (wp_footer, ‘method’) is not calling?
- Hook into wp_head(); in a plugin
- Hide gutenberg option blocks
- Use $query->set multiple times with pre_get_posts?
- admin_post hook not called
- How can I hook into the post editor title field in order to change the HTML?
- WordPress v5.0.3 Gutenberg & JS error “Uncaught SyntaxError: missing ) after argument list”
- Can’t get ID of post that relates to the comment
- Searching hook to set cookies before and avoid “headers already sent”
- Hook before inserting user into database [duplicate]
- Bulk action hook for admin pages which uses WP_List_Table
- Searching a hook which triggers when deleting a post to get all comments
- wp_redirect() not working on form submission with init hook
- WooCommerce – Overwrite action hook [closed]
- Admin Hook at the Login Page
- Which Hook? Hide attachments from specific post types in media library
- Custom action on login and “remember me”
- How to hook into Add New Member in BuddyPress
- Using wp_editor tinyMCE in metabox cause form alert on leaving page
- How to exclude a list of specific category in category widget in new post admin screen?
- Hook when new CPT published AND postmeta inserted
- Need to check is_archive during init
- When WP_CLI runs WordPress from the command line, are hooks called?
- Query categories that have a description
- Trying to run a compile command while saving post
- Execute JavaScript in WordPress Hook
- Action hook for custom tax edit
- wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all
- How do I prevent term from being created on create_term hook?
- Hook function prints output twice
- Add Different Actions To Different Page’s wp_footer
- Getting the post ID in parse_query
- How to register a widget when saving a post?
- Remove genesis_404 hook from genesis_loop [closed]
- What hooks do I need to hook into to capture ever wp_user creation/change?
- Is there a before_save_post hook or something similar
- Neccessary to call add_submenu_page and add_menu_page from admin_menu hook?
- Adding custom Bulk Actions
- Print results of a WP_Query to wp-admin/upload.php within ‘delete_attachment’ hook?
- Is there a way to Insert a post to post list?
- How to call do_action() to pass arguments to hooked functions that take different number of args?
- WP hook to add custom content after the_title()
- Is it likely that do_action will have unexpected results?
- How to export category name and category link in wordpress json
- Error later wordpress 5.3.2 update. Please help
- How to abort a save operation with a WordPress hook?
- wp_get_current_user Not working
- is_page not triggering
- admin_post_(action) hook create console log error
- Check if front page within function passed to action
- Hook after creating a post and retrieve infos from this post immediatly
- $new_pass always returns null – password_reset hook
- How to resolve 500 error in post listing page?
- Object oriented programming, add_action in constructor not firing
- Get new (not old) post inside transition_post_status hook
- How to Show Different Information to your authors/contributers
- Cannot override hooks.php
- Removing action from template class
- Remove “enqueued” script from array
- Function is Missing an Action Hook
- How to access variables in the function where apply_filters() is called?
- How to change Akismet commenter privacy notice?
- How To Apply Different Styles To All Blocks Based on Post Meta Value?
- PHP Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered
- getSaveContent.extraProps hook for core/post-title doesn’t add new attributes on to the frontend
- Callback API for getting response from fygaro payment gateway
- Changing login url
- The enqueue_block_assets is changing the styles of the editor interface
- Unable to trigger a frontend @wordpress/hooks action