Created
May 25, 2017 08:59
-
-
Save n7studios/09c8b338eef7d5d5dc1e535794710b65 to your computer and use it in GitHub Desktop.
The Events Calendar: Categories
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 | |
/** | |
* Plugin Name: The Events Calendar: Categories | |
* Plugin URI: http://www.n7studios.co.uk | |
* Version: 1.0.0 | |
* Author: n7 Studios | |
* Author URI: http://www.n7studios.co.uk | |
* Description: Register WordPress' Categories Taxonomies for The Events Calendar | |
*/ | |
/** | |
* Register the WordPress Category Taxonomy for use on Events. | |
* | |
* @since 1.0.0 | |
* | |
* @param array $args register_post_type() arguments | |
* @return array register_post_type() arguments | |
*/ | |
function enable_categories_on_events( $args ) { | |
$args['taxonomies'][] = 'category'; | |
return $args; | |
} | |
add_filter( 'tribe_events_register_event_type_args', 'enable_categories_on_events' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment