Skip to content

Commit

Permalink
added files so espresso is compatible with the event calendar plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredharbour committed Oct 16, 2012
1 parent 7955209 commit 606d29f
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
36 changes: 36 additions & 0 deletions events/ecp-page-template.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* If 'Default Events Template' is selected in Settings -> The Events Calendar -> Theme Settings -> Events Template,
* then this file loads the page template for all ECP views except for the individual
* event view. Generally, this setting should only be used if you want to manually
* specify all the shell HTML of your ECP pages in this template file. Use one of the other Theme
* Settings -> Events Template to automatically integrate views into your
* theme.
*
* You can customize this view by putting a replacement file of the same name (ecp-page-template.php) in the events/ directory of your theme.
*/

// Don't load directly
if ( !defined('ABSPATH') ) { die('-1'); }

//added this code so we can support the-events-calendar plugin

$view = tribe_get_current_template();
if( basename($view) === 'gridview.php' ){
add_filter('espresso_content_layout','espresso_tec_edit_layout');
}

function espresso_tec_edit_layout(){
return 'content';
}



?>
<?php tribe_events_before_html(); ?>
<?php get_template_part('espresso-template-before'); ?>
<h2 class="tribe-events-cal-title"><?php tribe_events_title(); ?></h2>
<?php include(tribe_get_current_template()); ?>

<?php get_template_part('espresso-template-after'); ?>
<?php tribe_events_after_html(); ?>
30 changes: 30 additions & 0 deletions events/ecp-single-template.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* If 'Default Events Template' is selected in Settings -> The Events Calendar -> Theme Settings -> Events Template,
* then this file loads the page template for all for the individual
* event view. Generally, this setting should only be used if you want to manually
* specify all the shell HTML of your ECP pages in this template file. Use one of the other Theme
* Settings -> Events Template to automatically integrate views into your
* theme.
*
* You can customize this view by putting a replacement file of the same name (ecp-single-template.php) in the events/ directory of your theme.
*/

// Don't load directly
if ( !defined('ABSPATH') ) { die('-1'); }
?>
<?php tribe_events_before_html(); ?>
<?php get_template_part('espresso-template-before'); ?>
<div id="container">
<div class="tribe-events-event widecolumn">
<?php the_post(); global $post; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php include(tribe_get_current_template()); ?>
<?php edit_post_link(__('Edit','tribe-events-calendar'), '<span class="edit-link">', '</span>'); ?>
</div><!-- post -->
<?php if(tribe_get_option('showComments','no') == 'yes'){ comments_template(); } ?>
</div><!-- #content -->
</div><!--#container-->
<?php get_template_part('espresso-template-after'); ?>
<?php tribe_events_after_html(); ?>
1 change: 1 addition & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function removeHeadLinks() {
}
add_action( 'after_setup_theme', 'espresso_setup' );


/**
* Register all the scripts for espresso
*
Expand Down

0 comments on commit 606d29f

Please sign in to comment.