I would add some hidden input field to frontend form, and check for its presence in the save_post hook.
...
<input type="hidden" name="saved-on-frontend" value="1">
...
And then check for it in that hooked function:
function my_save_hook() {
if( isset( $_POST['saved-on-frontend'] ) ) {
return; // don't do anything ...
}
}
add_action( 'save_post_CUSTOM_POST_TYPE', 'my_save_hook' );
Related Posts:
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- Catch and display error on save_post action
- How to enqueue scripts on custom post add/edit pages?
- Using save_post to replace the post’s title
- Prevent post from being published if custom fields not filled
- How to Debug the ‘save_post’ Action?
- Why won’t my metabox data save?
- Unregister post type from child theme
- Custom post type save_post action not firing
- How to add a button to custom post type’s posts-page
- How to hook into the CPT’s title placeholder?
- Submitting posts from the front end – sanitizing data
- Why get_next_post_link() or get_previous_post_link() doesn’t return the required links?
- Admin Post Update Redirection to Posts Screen
- How often do you need to register_post_type?
- How to set a custom post type post as static front page?
- With what hook can I address all posts from all custom post types when they are published?
- Custom field values get deleted
- specify meta_key / meta_value condition for prev_post_link and next_post_link
- Hook when adding or editing a specific custom post type? [closed]
- Change 2 fields in the post depending on the 3rd field before save
- remove_action conditionally for Custom Post Type
- What hook should be used to programmatically create a post only when master post is updated?
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- Unable to save or update postmeta for custom post type via action using save_post hook
- Add information above a custom post type listing of all posts page
- Remove “Get Shortlink” button in admin of custom post type
- update_post_meta() whenever custom post type is updated
- Trigger “unsaved changes” dialog for custom post meta changes
- Frontend posting – everything saves other than checkboxes?
- Custom Blog Post Listing in Genesis Sample Child Theme
- Custom Post Custom Taxonomy Data Not Saving in Edit Screen
- Set a default category – if the user didn’t select one- before creating a post
- Is it possible to create a post using a metabox?
- Can’t unregister parent theme’s CPT from my child theme
- Modifying date filter on admin page for custom post type to link to custom field
- Add custom column in custom post type edit page
- Insert Multiple Post with Same Publish Button
- Validate custom fields before save using WordPress Rest API
- Confusion regarding Nonce & using it in Custom Columns for Saving Checkbox Value to Post Meta
- How to get updated data when save_post triggers?
- How can I set taxonomy programmatically
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- Troubles with acf/save_post and WP_Query
- Limit number of custom posts per taxonomy
- CPT Validation to not show “Post updated.”
- save_post custom post type ? $_POST not working?
- Categorise Custom Post Types
- How can I add a filter to a particular post format?
- Custom Post Meta from custom metaboxes is randomly being deleted
- Is there any way to get list of all possible filter hooks for all post types?
- Get rid of “trash can” for custom post type
- Custom Post Type Metadata Not Saving
- detect when a custom post is cretaed for the first time
- Use remove_meta_box conditionally on custom post type
- How do I amend form data before it is saved for a custom post type
- Add an Outside Wrapper to my Header and Make it Full Width
- What do the numbers mean at the end of add_action(‘save_post’)…?
- How to detect that the save_post hook is calling the callback associated to the current edit post page only
- How to build a WordPress post review system beside commenting
- WordPress hook after post content and meta update
- ACF for custom post type archive pages: which hook to use?
- WordPress hook which triggers on post import
- Assigning alternate single-{cpt} template based on blog_id in multisite
- Before saving post hook
- Creating alternate meta box context locations
- Make a custom column sortable by a value from a different custom post type
- wordpress post_where set only for my costum post type
- Custom Post Type Meta Box Text Input Field Won’t Save When Blank
- Limiting actions only to edit.php page for specific custom post type
- Using publish_{custom-post-type} hook for custom post type to update meta doesn’t work
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Plugin Development using classes – Public & Private Callbacks
- Save post action is called twice
- Custom Post Type action on post update
- Show Post Types customized in Template Page
- Store a value in global scope after init hook is fired
- Urgent – WordPress keeps creating posts
- How to check for duplicate record before saving a Custom Post Type
- Dynamic page for nav items used as filters
- Hook create / update post
- Custom post types saved as basic post
- How to store additional data that is related to core data
- Custom post type meta fields missing on save_post_type
- How to stop post status from reverting to Published?
- save_post affect creation and deletion
- Link two different post using there post_id in post meta
- call a function when insert and update a custom post type
- How to implement custom post type’s users
- Execute code only after user clicks ‘update’ button for CPT being edited
- Metabox is not saving
- do action inside a class is not working
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Hook only specific post type
- Function that get ACF fields value before saving
- Create action running on trashed_post hook to modify post_meta value
- add comments custom fields after user is logged in
- Modifying post_type_link hook messing up edit function for a custom post
- How to use wp_set_object_terms depending on page ID?
- Change CPT Edit Target Link for Admin List