In my custom post type, if one of the fields are left blank, how can I insert a default value before it is saved to the db? This happens after the user clicks on Publish before I insert the default value so it all happens behind the scenes.
Share
You can use
pre_post_updateorsave_posthook :http://codex.wordpress.org/Plugin_API/Action_Reference/save_post
Or instead saving this default value in db, you can simply display it when the field is blank.