Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Genesis Simple Sidebars/Simple Menus support for Events Manager plugin
Plugin Name: Events Manager Genesis Simple Support
Description: Provides support for sidebars created with Genesis Simple Sidebars and menus created with Genesis Simple Menus for the Events Manager plugin
Version: 0.2
License: GPL
Author: The Team
Author URI:
// replaces supports for events CPT
function wpp_events_sidebar() {
$wpp_events_sidebar = array('custom-fields','title','editor','excerpt','comments','thumbnail','author','genesis-simple-sidebars','genesis-simple-menus');
return $wpp_events_sidebar;
// replaces supports for location CPT
function wpp_events_location_sidebar() {
$wpp_events_location_sidebar = array('title','editor','excerpt','custom-fields','comments','thumbnail','author','genesis-simple-sidebars','genesis-simple-menus');
return $wpp_events_location_sidebar;
// check if events function exists
if( function_exists( 'wp_events_plugin_init' ) ) {
// adds genesis simple sidebars and menus to regular events
// if recurring events are enabled, this filter adds genesis simple sidebars to them too
add_filter( 'em_cp_event_supports','wpp_events_sidebar' );
// adds genesis simple sidebars and menus to locations if locations are enabled
if( get_option('dbem_locations_enabled', true) ) {
add_filter( 'em_cp_location_supports','wpp_events_location_sidebar' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment