Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save joshfeck/50b8a7151ce59abb32e4 to your computer and use it in GitHub Desktop.

Select an option

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.
<?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