I have created a custom post type that contains television channel data. Each channel has its own post. I have also created a custom taxonomy of channel groups. What I want to do is query all the data and display it all on a table on a single page like so:
Channel # | Channel Name | Basic Package | Delux Package | Elite Package 1 | NBC | X | X | X 2 | ESPN Classic | | X | X
What I need is a query that will return the related taxonomies for each post. This is what I have so far:
$args = array( 'post_type' => 'my_channel', 'numberposts' => -1, 'order_by' => 'menu_order', 'order' => 'ASC', 'tax_query' => array( array( 'taxonomy' => 'my_channel_package', 'field' => 'slug', 'terms' => array('basic', 'delux', 'elite'), ), ), ); $posts_array = get_posts($args);
But the post array does not return the taxonomy data. Is my next option to query the database with custom SQL or am I missing a feature in the WordPress API?