The “save_post” action is only called when we actually changed
something in the post page form. If we just press the update button,
without changing anything, the “save_post” action is not called.This is important if we are editing a custom post type where we had
custom meta boxes. If we rely on the “save_post” action and only
change stuff on our custom meta boxes, nothing will happen.The solution is to use the “pre_post_update” action hook, instead of
“save_post”
http://wordpress.org/support/topic/save_post-not-working-getting-called#post-2335557
Related Posts:
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- update_post_meta() whenever custom post type is updated
- What do the numbers mean at the end of add_action(‘save_post’)…?
- 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
- remove custom post type permalink
- How to change “Draft” string for status of custom post type to “Unavailable”?
- Why won’t my metabox data save?
- Action hook on Edit custom post type?
- Unregister post type from child theme
- How to correctly get post type in a the_title filter
- How to intercept publish post for a custom post type “event”
- Why The Init Hook For Custom Post Types
- Submitting posts from the front end – sanitizing data
- With what hook can I address all posts from all custom post types when they are published?
- Make the ‘all’ filter default instead of ‘mine’ in a custom post type
- Dynamically Create Terms in Taxonomy when Custom Post Type is Published. Almost There!
- Is there an easy way to AJAX-ify saving of post?
- Custom field values get deleted
- WordPress Custom Shortcode Conflicting with Media Library
- Change 2 fields in the post depending on the 3rd field before save
- WordPress custom post action hook
- action init hook and get_post_types
- What hook should be used to programmatically create a post only when master post is updated?
- pre get posts changing the query
- Unable to save or update postmeta for custom post type via action using save_post hook
- Using pre_get_posts to Filter Posts
- Remove “Get Shortlink” button in admin of custom post type
- Trigger “unsaved changes” dialog for custom post meta changes
- How to get Custom Post ID by adding filter to child theme’s function
- Frontend posting – everything saves other than checkboxes?
- Custom post_type search’s $wp_query->query_vars do not correspond
- Check Title Unique Or Not and If not error message and dont save
- Custom Post Custom Taxonomy Data Not Saving in Edit Screen
- Is it possible to create a post using a metabox?
- Can’t unregister parent theme’s CPT from my child theme
- Confusion regarding Nonce & using it in Custom Columns for Saving Checkbox Value to Post Meta
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- How to get updated data when save_post triggers?
- Custom post type unintentionally called in every page
- Displaying custom taxonomy in the admin list of a custom post type
- How can I set taxonomy programmatically
- Can taxonomies of custom post types be used with category actions?
- 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
- Custom post type suppress transition from future to publish
- CPT Validation to not show “Post updated.”
- save_post custom post type ? $_POST not working?
- Using preg_replace to filter custom textarea
- Custom Post Meta from custom metaboxes is randomly being deleted
- Create new custom post and post category of same name
- Mutiple Select only POSTing 1 value
- 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
- Include php on a specific page template
- wp_trash_post action hook with custom post type
- How do I amend form data before it is saved for a custom post type
- Running a wordpress action when a custom post type term (taxonomy category) is changed
- How check if a post is saved from backend or frontend?
- How to detect that the save_post hook is calling the callback associated to the current edit post page only
- Types plugin custom post add_action hooks
- Loading plugin text domain before registering post type
- How can I get some of a posts meta data whilst it is still inserting?
- add_action ‘init’ from inside a class for custom post types
- How to prevent meta data from being edited in a post?
- Catch and display error on save_post action
- Custom Post Type Meta Box Text Input Field Won’t Save When Blank
- How to recover the post ID earlier in the WP admin hook action “firing” sequence?
- Using `set_transient()` when saving a custom post type
- Using publish_{custom-post-type} hook for custom post type to update meta doesn’t work
- Save post action is called twice
- Urgent – WordPress keeps creating posts
- Post Click Redirect to Custom URL instead of Single Post Page
- Custom post types saved as basic post
- publish_post action callback not executed, why?
- Post meta is not accessible within save_post hook
- How to store additional data that is related to core data
- Custom post type meta fields missing on save_post_type
- How to save post_status using action save_post?
- 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
- Keep br tags from stripping
- Custom meta box data not saving
- How to implement custom post type’s users
- How to hook save-post function to use taxonomy term in post-slug?
- Metabox is not saving
- do action inside a class is not working
- Filter wp_dropdown_categories Per Post Type
- Generate slug and meta data if meta field is empty
- Problem with ‘save_post’ hook not running
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Function that get ACF fields value before saving
- What is the proper way implement a global $wp_rewrite?
- Dynamically change post_parent in every page load?
- Create action running on trashed_post hook to modify post_meta value
- Custom post type functions.php if statement on action
- How to use wp_set_object_terms depending on page ID?