The category filter is built-in. 🙂
[events_list category=”CATEGORY ID”]
http://wp-events-plugin.com/documentation/shortcodes/
If you want to use a custom field, you will need custom coding.
Thanks Patrick, I saw that but was hoping to find a hook to be able to change the query pre-display, so that I can make use a single calendar theme template that uses the shortcode, but displays different results based on the custom field from the specific page where the template is used.
I’ll play with the shortcode though, worst case maybe I generate the shortcode to a custom field on each page, then use that on subsequent page loads — a little hacky but it could maybe work….
Thanks!
David
For what it’s worth, this seems to work.
I created a PHP file containing the shortcode stored as a variable, $eventslist_shortcode, with another variable, $cat_ids, for the actual categories — that could be passed in the URL, from a form submission, from a page’s custom field, etc.
$eventslist_shortcode = '[events_list_grouped mode="monthly" limit="20" category="'.$cat_ids.'"] <-----HTML AND PLACEHOLDER TAGS GO HERE ---> [/events_list_grouped]';
Then created a function in a new page template like this:
include_once(get_stylesheet_directory() . '/some/path/eventlist_shortcode.php');
echo do_shortcode($eventslist_shortcode);
Can be fancied up a bit, but as proof of concept it does what I need, so yay!
And it seems to work so far