Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a foreach-loop that looks like this

foreach($selected_courses as $postid) {
            $course = new WP_Post($postid);

where $selected_courses is an array of ids based on a form submit. For each id I create a post-object (which is a custom post type course)

Is there any good/fast way to retrieve the parent custom taxonomy of this course? (I don't create another loop for this if it is not neccessary)

(I have custom post types courses which are related to custom taxonomy categorycourses)

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.