Advertisement
BakerMan

Load a different tpl for month views (TEC 2.0.9)

Nov 8th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <?php
  2. /**
  3.  * This has been customized to load a different template for month views,
  4.  * where we desire a full width layout.
  5.  */
  6.  
  7. // Don't load directly
  8. if ( !defined('ABSPATH') ) { die('-1'); }
  9.  
  10. ?>
  11. <?php get_header(); ?>
  12. <?php
  13. if (tribe_is_month()):
  14.     // You would need to change "full-width" (below) to the
  15.     // name of your theme's actual full width template
  16.     get_template_part('full-width');
  17. else:
  18. ?>
  19.     <?php tribe_events_before_html(); ?>
  20.     <h2 class="tribe-events-cal-title"><?php tribe_events_title(); ?></h2>
  21.     <?php include(tribe_get_current_template()); ?>
  22.     <?php tribe_events_after_html(); ?>
  23.     <?php get_footer(); ?>
  24. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement