Show custom field validation errors in WordPress Admin

Show custom field validation errors in WordPress Admin

If you are creating your own custom post type in wordpress and you use some custom fields to store data related to each post. For e.g. if you create a custom post for events then you would store data like event start date, end date, address, etc within custom fields. Unless all the all required custom fields are filled you do not want to publish the event and so you would want to warn the event editor about it. Wordpress admin_notices hook allows to achieve this very easily [crayon-59ebd66c274d2256361329/] admin_notices is the hook available to display the messages add_settings_error - Registers the setting error to be displayed to the user settings_errors - This function simply displays all the errors line by line...
Read More