-
-
Save robincornett/14b1f60d2519ec568916 to your computer and use it in GitHub Desktop.
Tribe Calendar edits--functions.php
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 | |
/** Calendar */ | |
add_filter( 'genesis_pre_get_option_site_layout', 'rgc_force_layout' ); | |
function rgc_force_layout($layout){ | |
if ( is_admin() ) | |
return; | |
global $wp_query; | |
if ( 'tribe_events' === $wp_query->query_vars['post_type'] && ! empty( $wp_query->query_vars['eventDisplay'] ) && ( 'photo' === $wp_query->query_vars['eventDisplay'] || 'month' === $wp_query->query_vars['eventDisplay'] ) | |
) { //Month or Photo Layout Pages | |
$layout = 'full-width-content'; | |
} | |
return $layout; | |
} | |
add_action( 'init', 'rgc_calendar_menu' ); | |
function rgc_calendar_menu() { | |
add_post_type_support( 'tribe_events', 'genesis-simple-menus' ); //adds menu support for creating events | |
} | |
/** Tribe Fixes */ | |
add_filter( 'tribe_get_organizer_email', 'eae_encode_emails' ); // for email obfuscator plugin | |
remove_action('tribe_events_single_event_after_the_meta', 'tribe_single_related_events'); // remove the related events from single pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment