Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Last active April 6, 2019 11:55
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jesseeproductions/95379b711c5fbf7d5825 to your computer and use it in GitHub Desktop.
Save jesseeproductions/95379b711c5fbf7d5825 to your computer and use it in GitHub Desktop.
Genesis Page Layout of The Event Calendar Main Events Page
/*
* Genesis Page Layout of The Event Calendar Main Events Page
* The Events Calendar @3.10
* Genesis @2.1.2
* Options - full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target all Event Views (Month, List, Map etc), Single Events, Single Venues, and Single Organizers
//add_filter( 'genesis_site_layout', 'tribe_genesis_all_layouts' );
function tribe_genesis_all_layouts() {
if( class_exists( 'Tribe__Events__Main' ) && tribe_is_event_query() ) {
return 'full-width-content';
}
}
//Target all Event Views (Month, List, Map etc)
//add_filter( 'genesis_site_layout', 'tribe_genesis_view_layouts' );
function tribe_genesis_view_layouts() {
if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {
return 'full-width-content';
}
} elseif ( class_exists( 'Tribe__Events__Main' ) && !class_exists( 'Tribe__Events__Pro__Main' ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {
return 'full-width-content';
}
}
}
//Target Single Events, Single Venues, and Single Organizers
//add_filter( 'genesis_site_layout', 'tribe_genesis_single_layouts' );
function tribe_genesis_single_layouts() {
if( is_singular( 'tribe_events' ) || is_singular( 'tribe_venue' ) || is_singular( 'tribe_organizer' ) ) {
return 'full-width-content';
}
}
//Target Community Events Edit Form and My Event's List
//add_filter( 'genesis_site_layout', 'tribe_genesis_community_layouts' );
function tribe_genesis_community_layouts() {
if( tribe_is_community_my_events_page() || tribe_is_community_edit_event_page() ) {
return 'full-width-content';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment