I followed the directions in this post: https://theeventscalendar.com/support/forums/topic/embed-calendar-in-page-but-only-show-one-category/ to create a way to display a calendar w/ only one category, however, I need the ability to do this in other places in the site as well for other categories, in particular, in posts and pages.
I came up with this solution: http://pastebin.com/q4ZD0GdU and I init it using code like this in the template:
global $tbocc_event_cat;
$tbocc_event_cat = 245;
tribe_calendar_grid();
This works fine in the template, but if I use a php execution plugin to allow me to use this in a post or page, the calendar that is displayed shows all events.
Why does this work in a template but not in a page? I am guessing it’s because in a page it’s inside the loop whereas when I’m using it in the template it’s not?
What would I need to do to make this work? Feel free to improve it as well, this is a dirty hack I know. 🙂