Skip to content

Instantly share code, notes, and snippets.

@n7studios
Created May 25, 2017 08:59
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 n7studios/09c8b338eef7d5d5dc1e535794710b65 to your computer and use it in GitHub Desktop.
Save n7studios/09c8b338eef7d5d5dc1e535794710b65 to your computer and use it in GitHub Desktop.
The Events Calendar: Categories
<?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