I have two post types, courses and testimonials, sharing the same taxonomies. What I am looking to accomplish is to check whether a course is in the same category as a testimonial. Then display if it is, keeping in mind they could have more than one category each.
I am currently able to check which categories they are in using
get_the_term_list() but can't figure out how to go about comparing them to one another.
What I need is to be able to check is if the categories checked off in pm_course(post-type) is the same as course_testimonials(post-type). If they have the same category then I want to display the testimonial, if not I want to do nothing.
Really a basic if else statement but I can't seem to find a way to see if the checked categories are the same in both.