Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created July 30, 2012 13:44
Show Gist options
  • Save joshfeck/3207009 to your computer and use it in GitHub Desktop.
Save joshfeck/3207009 to your computer and use it in GitHub Desktop.
calendar page template for the striking WordPress theme
<?php
/*
Template Name: Calendar
*/
if(is_blog()){
return require(THEME_DIR . "/template_blog.php");
}elseif(is_front_page()){
return require(THEME_DIR . "/front-page.php");
}
$layout = get_post_meta($post->ID, '_layout', true);
if(empty($layout) || $layout == 'default'){
$layout=theme_get_option('general','layout');
}
?>
<?php get_header(); ?>
<?php theme_generator('introduce',$post->ID);?>
<div id="page">
<div class="inner <?php if($layout=='right'):?>right_sidebar<?php endif;?><?php if($layout=='left'):?>left_sidebar<?php endif;?>">
<div id="main">
<?php theme_generator('breadcrumbs',$post->ID);?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div class="content">
<?php // calendar shortcode on the next line, please see the calendar documentation for shortcode parameters
echo do_shortcode('[ESPRESSO_CALENDAR show_expired=true]'); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'striking_front' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link(__('Edit', 'striking_front'),'<footer><p class="entry_edit">','</p></footer>'); ?>
<div class="clearboth"></div>
</div>
<?php endwhile; ?>
<div class="clearboth"></div>
</div>
<?php if($layout != 'full') get_sidebar(); ?>
<div class="clearboth"></div>
</div>
<div id="page_bottom"></div>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment