Post Terms As Class Name For Full Calendar Events
You are using get_single_term in a way that would require it to return a value… $term = get_single_term($post->ID, ‘course_locations’); … but you have written it in such a way that it echos a value. You should have… function get_single_term($post_id, $taxonomy) { $terms = wp_get_object_terms($post_id, $taxonomy); if(!is_wp_error($terms)) { return $terms[0]->name; } } I noticed a couple … Read more