Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created February 24, 2021 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/e6fb95448cf2dd6965fbc9cc1215e5be to your computer and use it in GitHub Desktop.
Save Pebblo/e6fb95448cf2dd6965fbc9cc1215e5be to your computer and use it in GitHub Desktop.
Example of how you can filter the query params used to pull the calendar events and query based on a Post Meta value.
<?php // Please do not include the opening PHP tag if you already have one.
add_filter('FHEE__EED_Espresso_Calendar__get_calendar_events__query_params', 'tw_filter_get_calendar_events__query_params', 10, 7);
function tw_filter_get_calendar_events__query_params($query_params) {
$query_params[0]['Event.Post_Meta.meta_key'] = 'Language';
$query_params[0]['Event.Post_Meta.meta_value'] = 'English';
return $query_params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment