Created
December 8, 2015 16:52
-
-
Save jesseeproductions/b48bff4db7ca7a01c6cc to your computer and use it in GitHub Desktop.
The Events Calendar Facebook Events - Add Category to Imported Events
This file contains hidden or 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
| /** | |
| * The Events Calendar Facebook Events - Add Category to Imported Events | |
| * change Facebook Event to the name of the event category | |
| * @Version 4.0 | |
| */ | |
| add_action( 'tribe_events_facebook_event_created', 'tribe_fb_add_category' ); | |
| function tribe_fb_add_category( $event_id ) { | |
| wp_set_object_terms( $event_id, 'Facebook Event', 'tribe_events_cat', false ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment