Created
March 26, 2020 10:19
-
-
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.
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
/* 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