Last active
August 29, 2015 14:14
-
-
Save joshfeck/50b8a7151ce59abb32e4 to your computer and use it in GitHub Desktop.
Display a calendar of events instead of the Espresso Events custom post type archive. Requires: Event Espresso 4, Espresso Calendar add-on, Genesis theme. Usage: Add this file to your Genesis child theme.
This file contains hidden or 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 | |
| if ( class_exists( 'EED_Espresso_Calendar' ) ) : | |
| global $is_espresso_calendar; | |
| $is_espresso_calendar = TRUE; | |
| if ( ! has_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' ))) { | |
| add_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' )); | |
| } | |
| if ( EED_Espresso_Calendar::instance()->config()->tooltip->show ) { | |
| add_filter('FHEE_load_qtip', '__return_true' ); | |
| } | |
| remove_action ( 'genesis_loop', 'genesis_do_loop' ); // Remove the standard loop | |
| add_action( 'genesis_loop', 'ee_custom_calendar_view' ); // Add custom calendar view | |
| function ee_custom_calendar_view() { | |
| echo do_shortcode( '[ESPRESSO_CALENDAR]' ); | |
| } | |
| endif; | |
| genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment