Skip to content

Instantly share code, notes, and snippets.

@farukgaric
Created March 26, 2020 10:19
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 farukgaric/08604adf7b47439be598dcd5ef102e8f to your computer and use it in GitHub Desktop.
Save farukgaric/08604adf7b47439be598dcd5ef102e8f to your computer and use it in GitHub Desktop.
Here is a simple snippet by @pbosakov that needs to be placed in function.php file in order to move all your events online due to COVID-19.
/* all events moved online due to COVID-19 */
if (!function_exists('custom_event_schema_extras')) {
function custom_event_schema_extras($_data, $args, $event) {
$_data->eventStatus = 'EventMovedOnline';
$_data->eventAttendanceMode = 'OnlineEventAttendanceMode';
return $_data;
}
add_filter('tribe_json_ld_event_object', 'custom_event_schema_extras', 10, 3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment