Taxonomy Hook

add_action( wp_insert_post, 'set_brand');

function set_brand($postid){
$brand_name = get_post_meta($postid, 'Brand Name', true);
wp_set_object_terms($postid,$brand_name,'brand');
}

0 Comments

You must be logged in to post a comment.