add_action( 'save_post', ...
and test if your post type is tour custom post type.
Related Posts:
- what is the correct way to compare dates in a WP query_posts meta_query
- Get post with multiple meta keys and value
- Echo all meta keys of a custom-post TYPE
- Post metadata deletes itself
- How to create a mini directory in WordPress?
- Custom Post Type: Set post_title equal to a custom post type field
- I can’t set meta_key in my custom post type query
- Can’t sort order of wp_query with 2 meta keys
- How to get source of custom meta image?
- How can I include meta box content when searching?
- update a post meta from a single table cell TablePress
- Automatically adding meta data to posts or multiple query help
- Trigger “unsaved changes” dialog for custom post meta changes
- Conditionally Query Custom Post Types by Post Meta for Blog Home Page?
- Displaying custom posts only if custom meta box’s date is not expired
- Displaying Metabox value (custom post type taxonomy)
- How do I sort a custom post type admin column using two meta keys?
- How can I display my custom metaboxes on a custom post template?
- Custom Post Type, Saving Multiple Checkboxes
- Create a random unique 6 digit number as custom field for custom post type
- Export entries and multiple custom field meta to .csv?
- how to interconnect custom post types?
- orderby in custom WP Query does not work
- Insert post metadata for all posts in CPT at once if metadata no existent
- Display custom post type from dynamic custom field
- Populate dropdown from one custom post type inside another custom post type
- Notice: Undefined index: error and understanding wordpress
- Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
- Deleting Custom Posts & Meta Data on Uninstall
- How do I create an archive page as a including metadata?
- A better way to add a meta box to custom post types
- Two Custom Post Types Many to Many Relationship
- how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?
- post meta parameter in post custom-post-type endpoint with restapi
- How do I set all of a particular post meta to a value within the custom post type I’m in?
- Update postmeta Parent when post_status child change
- Update database from Quick Edit according to Checkbox state of Custom Post Type
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Dynamic Custom Fields
- Show Custom Post Type meta boxes only on Page Edit
- Custom filter function not working with Custom post type
- Importing Data from a Non-WordPress database, into WP
- List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Meta Data for Custom Post Type not saving
- Check if post with same meta value exists
- Filter date from post meta when date is in string format
- Do posts, pages and / or custom post type objects have unique ID numbers or can there be multiple objects with the same IDs?
- Archieve.php not loading for custom post type
- Get $post->ID from a URL
- Create Array from custom post type to display a slider
- Values from meta-box not on $_POST
- Returning a custom content types with meta values
- Custom post type suddenly stoped working after WordPress 5 update
- copy images from custom field to another custom field
- Cannot obtain custom meta information
- is_main_query() never called on WP 4.4
- How can I output WPAlchemy repeating fields meta values in my page template?
- Save Metabox Custom Field Value
- Meta box data not saving
- How can I get some of a posts meta data whilst it is still inserting?
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Cannot Save MetaBox Data in Custom Post Type
- best way to use custom taxonomy, post type and meta in a job system
- Empty meta-box returns publishdate if no value is set?
- Building tags and archive using meta from custom post type
- How to order custom posts by one of the custom fields value, ‘date’?
- Custom Meta Box with variable number of fields
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- How to create review point system for CPTs (many-to-many relationship)
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- How can I write a function that would update any missing specific post metadata?
- SELECT custom post type and its meta in SQL
- How to keep custom post type related information
- Custom attachment function not working in v5.4.2?
- How can I use a custom template to load custom post type posts based on a post_meta value
- How do I create a customised table list of a custom post type (in the admin area)?
- How to properly get the wp_postmeta.meta_value of a custom post type in specifics?
- Custom Function to redirect singular post if specific meta field is empty
- Saving Child Terms on front end not setting parent
- Metaboxes in Loop
- Custom post type: “transition_post_status” action get title and other fields
- update a posts of other custom post type
- How do I extract the contents of a CPT’s custom field for all posts?
- Delete custom post type metadata without deleting the post in admin area
- Order by post meta value gets random results
- How can I get the $key / $value pairs of custom fields that were added via 3rd party plugins or themes?
- meta query always fails even if data is correct
- Display a post count from a custom metabox selection
- How to rewrite CPT-Permalinks the correct way (incorporating meta-box-data)?
- Rich Custom Field for Custom Post type not saving
- Custom post type submenu sorted by specific meta_key & meta_value
- Querying meta values within an array
- Post AND page parameter for WP function
- why get_post_meta is returning 0?
- How to display Author Profile based on Custom field value
- Automatically add custom taxonomy when meta value gets to a set number or beyond
- Display a list of posts whose meta field values are equal to the ID of the post being viewed?
- Check for custom field value in different post type than current one and do something