How to keep a check box in custom meta box for custom post type checked by default for add new post?
save_post being called multiple times is expected behavior, but because of how it’s used, you may not always want your code to execute until the user actually clicks on the save button. Like you have mentioned above regarding your requirement. So you can check the current page ( i.e post-new.php ) in the wp-admin and … Read more