Created
February 24, 2021 13:59
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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