Hello! I’m setting up a calendar using parent and children categories.
I’m trying to query a specific category, however only the parent category, excluding all children. I have been unable to filter out children posts. I believe I read this must be done using tax_query for The Events Calendar.
Is there any way to quickly do this or a better approach? I’ve tried 'post_parent' => 0, and searched for other manners but can’t seem to find a good solution.
$events = tribe_get_events( array(
'start_date' => date( 'Y-m-d H:i:s', strtotime( '-28 week' ) ),
'posts_per_page'=>-1,
'tax_query'=> array(
array(
'taxonomy' => 'tribe_events_cat',
'field' => 'slug',
'terms' => 'sat-courses',
)
)
) );