You should hook onto the save_post action.
add_action( 'save_post', 'add_video_taxonomy' );
function add_video_taxonomy( $post_id ) {
// you should check if the current user can do this, probably against publish_posts
// you should also have a nonce check here as well
if( get_post_meta( $post_id, 'video_url', true ) ) {
wp_set_post_terms( $post_id, 'video', 'your_custom_taxonomy_name', true );
}
}
Related Posts:
- Get value in custom field with taxonomy [closed]
- Outputting an array of term meta values in a custom WooCommerce tab?
- Print terms with taxonomy and metabox value
- Can I use a Custom Meta Value inside of ‘get_the_terms’?
- How to add contents of a custom field to a taxonomy term list?
- How to support fifteen thousand terms in WordPress?
- Extra Meta Data for WordPress Multisite Taxonomy
- How to use custom slug and custom templates for custom taxonomy?
- Count tags for current post and save into custom meta field (and update it on post edit)
- Create new Taxonomy, add extra fields, register terms AND extra fields values?
- Remove Custom metabox from particular page template is used
- How to filter a taxonomy meta field to the ‘single_term_title’ filter hook
- Taxonomy Extra Meta [duplicate]
- get_posts assigned to a specific custom taxonomy term, and not the term’s children
- How can I get only parent terms?
- Retrieve posts by term id custom query
- How to prevent new terms being added to a custom taxonomy?
- Order terms by term_order
- Custom taxonomy hide meta box but show in menu
- Get second level terms of custom taxonomy
- Large taxonomy (2000+ terms), causing WordPress to hang
- How do you remove a Category-style (hierarchical) taxonomy metabox?
- Is there a way to disable a term rather than deleting it?
- Modify Term Update Redirection
- Check if current term is a child of another term
- Is there a way to import terms into WordPress?
- get_terms() doesn’t return empty terms even though hide_empty is false
- Remove Category description textarea
- Get taxonomy name of current post
- Custom metabox for menu administration page?
- Custom Fields and performance
- Non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue
- show term description instead of list terms of custom taxonomy
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- How to get the top most term (top ancestor) of a custom taxonomy child term?
- Display Custom Taxonomy Terns ordered by meta_value
- get_the_term_list without specific category
- List only first-level children of specific custom taxonomy term
- get_terms of post->id
- Dynamically tax_query terms
- get / list categories and counts filtered by custom taxonomy term
- How to get a list of taxonomy terms which are being used only within certain post types?
- how to search in custom fields & custom taxonomy for custom search
- get_the_terms() to show all custom taxonomies
- List the number of posts for each custom taxonomy and specific custom field value
- Custom Taxonomy Archive BUG
- Can I limit term selection to one plus parent?
- Insert form checkbox at bottom of taxonomy edit term page
- how does get_term_by know which term to return when the same term appears twice in a hierarchical taxonomy?
- Changing stylesheet depending on custom taxonomy terms
- Taxonomy archive showing no results
- How Can I Change a Taxonomy URL Based On The Originating URL?
- Custom Taxonomy to dropdown box on adminside wordpress
- Changing taxonomy term by slug (wp_update_term)
- Custom Taxonomy Term Caching?
- Display value of custom field of custom taxonomy in single post?
- List related terms + taxonomies
- Multi-select field for Taxonomy can’t save the value
- Weekdays as terms – How to order taxonomy terms by ID in admin panel?
- How to find taxonomy parent id from child taxonomy page?
- Set term on an attachment using wp_set_object_terms and want to display the full term text but it’s showing a slug instead
- Why does wp_remove_object_terms not work?
- how to get term id from current post type instead of name
- Display children category images
- Loop through custom taxanomy in post and display custom fields from posts
- Reusable metabox backend and frontend
- How to show post for a particular term of custom taxonomy?
- How to get this value inside RETURN
- Hide echo of no categories from get_object_taxonomies
- Custom Taxonomy dont save in a frontend form for post a custom post
- How to get the term description in a taxonomy term archive query?
- How to list terms by first letter, as in A’s then B’s etc
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Create multiple taxonomies with custom fields values on the fly when creating new posts
- display ACF repater field in archive page
- Cloning product not copying custom taxonomies
- PHP Warning with Custom Fields
- get parent and childs from hierarchcial taxonomy
- How to change custom categories term links?
- Dropdown (with onChange) with custom taxonomies
- Get Highest and Lowest get_term_meta() value from Taxonomy Term
- ACF Custom field not showing in Timber Taxonomy page
- Pre_get_post custom taxonomy combined with custom fields?
- Adding a checkbox field to a (custom) taxonomy
- How to get a terms and posts associated with another term?
- Displaying subcategories and then posts in taxonomy template
- Resize $term attachment using url
- Custom order of taxonomy using wp_get_object_terms and woocommerce_term_meta
- List terms and order by second word
- Does a codex exist for creating meta boxes in taxonomy
- Display taxonomy term slugs
- Tax query array terms display out of order
- Avoiding stripping of HTML in Custom Taxonomy Meta Field
- add custom fields in custom taxonomy meta box in wordpress-3.5.2
- Display term description on hover using get_the_term_list
- stdClass::$labels /wp-includes/general-template.php undefined
- Display woocommerce product_cat child terms with thumbnails
- List posts grouped by children of a custom taxonomy
- How to delete unused terms?
- Foreach for get_the_terms for hierarchical taxonomy don’t repeat Top Level Terms if contains multiple Second Level Terms