Using get_categories only for posts child of another post (1 post)

  1. wonderm00n
    Posted 2 years ago #

    This is quite confusing. Let's see if I can explain myself...

    I have the following:
    - EVENTS (custom post type)
    - SPONSORS (custom post type, child of EVENTS)

    When on the events page I want to list the categories (sponsor-type) that have posts (SPONSORS) that belong to this event.

    I've used this:

    $categories=get_categories( array(
    			'taxonomy' => 'sponsor-type',
    		) );

    And it gets the correct "sponsor-type" list but for any event. How can I pass the event->ID to this in order to get only the 'sponsor-type' that have 'sponsor', child of a specific 'event'?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.