Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 288 characters in body
Source Link

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 hope thisneed is clear. Any help at allto be able to check is much appreciatedif the categories checked off in pm_course(post-type) is the same as course_testimonials(post-type). ThanksIf 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 advanceboth.

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.

I hope this is clear. Any help at all is much appreciated. Thanks in advance.

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.

Source Link

Compare Two Custom Post Types Using The Same Custom Taxonomy

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.

I hope this is clear. Any help at all is much appreciated. Thanks in advance.