You can use the pre_post_update
hook to get the new value before the post is saved. This way you can check if the value has changed (old value is still in the database at this point) and do your magic.
See https://developer.wordpress.org/reference/hooks/pre_post_update/
Related Posts:
- How to get all taxonomies of a post type?
- Permalinks: custom post type -> custom taxonomy -> post
- How to Add Tags to Custom Post Type?
- Mixing custom post type and taxonomy rewrite structures?
- Can multiple custom post types share a custom taxonomy?
- How to Add Custom Fields to a Custom Post Type?
- Efficient Taxonomy Intersection
- Display current taxonomy term when inside custom post type
- limit selection of custom taxonomies to one?
- Set relationship between custom_post_types
- $wp_query->queried_object->ID throws warning: Undefined property
- How to list custom taxonomy categories?
- clients list using wordpress
- Custom taxonomy query for a custom post type
- Extend walker class with custom post types [closed]
- How to do a custom bookmarks post type?
- Custom permalinks – post type – hierarchical taxonomy’s
- Taxonomy posts on Archive page
- Taxonomy list. Order by a specific custom post type count
- Rewrite CPT slug with two taxonomy slug instead of one
- Archive or taxonomy pages not working for custom post type
- Custom Taxonomy returns no posts
- How to display Custom Taxonomy of Custom post type
- Custom content type meta_box_cb does not run
- associate custom post type with tags with specific pages
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Custom Taxonomy breaking pages permalinks
- Custom post types and permalinks
- taxonomy template for custom post type the same as the archive
- Get categories and descriptions from custom post type
- Problem with custom post types, taxonomy and permalinks
- How to create new category for custom post type?
- Fetch taxonomies by custom post type id array
- Repeating posts when paginating random posts
- Normal pages as children of my Custom Post Type
- Query/list all terms and their custom post count
- Remove url rewrites for registered taxonomies
- Received nothing after executing AJAX post function
- How can I auto-assign a CPT post to category in a custom taxonomy when published?
- How can I make a custom post type sticky?
- Mapping Subdomains in WordPress to give the appearance of a localised site, best approach?
- Get Taxonomy Term Title by it’s URL
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- Group CPT posts by custom taxonomy
- Limit number of custom posts per taxonomy
- Number of Custom Post Types published are not being shown in the custom page
- Metabox not show in categories custom post type cmb2
- Categorize custom post type
- Load Custom_post_type categories post with ajax
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- WP-API select custom taxonomy when creating a post
- List of Posts and Categories
- Why is my WP_Query outputting my entries twice?
- How to display Related Posts based on number of taxonomy terms matched
- How to solve this custom post type goes to 404 page?
- Get term name without a foreach loop
- How to Set Taxonomy Object Description?
- Custom Post Type with Custom Taxonomy as Category
- WP_Query() with custom post type and taxonomy — get all terms?
- Add term list as class
- Taxonomy archive 404ing (not term archive)
- Variable not working in WP_Query
- How do I get the custom category URL from the custom post type?
- Alphabetically sort a taxonomy.php template by post title
- Show Taxonomies with admin area for custom post type?
- get_terms() parent, child and grandchild
- Custom Post Type Custom Archive Page Not Working
- Enabling permalinks disables custom page template
- Getting custom taxonomy posts on archive page
- Multi Parameter search with custom post type category and tag
- How to create Custom Taxonomy Search Drop Down for specific Post Type
- Can I set the post_type query_var as a link is clicked?
- Remove cpt slug from url and use custom taxonomy instead breaks all other cpt
- How to display custom taxonomy term specific post?
- Get taxonomy name used in a current post
- Changing permalink of default Post with custom post
- get_queried_object not work in taxonomy page
- wp_insert_post deleting previous post custom meta
- Custom Taxonomy Archive generates 404
- How to create a permalink structure with custom taxonomies and custom post types
- Support for author does not show author column in post table in dashboard
- How to get all posts related to a taxonomy?
- Custom post types not displaying per category
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Force WordPress to only match URL in category
- Hierarchical taxonomy in permalink structure
- Can I create a taxonomy term that mirrors the name of a new custom post?
- Rewrite for custom type and custom taxonomy
- How to create TEMPLATES for TAXONOMIES? What I have to change in this code?
- Custom Post Status & Taxonomies
- Why won’t this rewrite rule work?
- Archive.php is not displaying tags
- Show Custom Post Type taxonomy term that matches custom field
- How to not have the items of the subtaxonomy within the parent taxonomy
- How to save an integer as taxonomy term?
- Sort custom post type items by taxonomy description
- How to Display Custom Taxonomies in an Un-ordered HTML List
- how do I create a breadcrumb to work with multiple custom taxonomies
- Get custom post type parent category
- How can i change url structure of cpt like this?