Created
July 25, 2012 19:15
-
-
Save samikeijonen/3177973 to your computer and use it in GitHub Desktop.
Hatch Pro Blog Template
This file contains 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 | |
/** | |
* Template Name: blog | |
* | |
* A custom page template for displaying blog archives. | |
* | |
* @package Hatch Pro | |
* @subpackage Template | |
*/ | |
get_header(); // Loads the header.php template. ?> | |
<?php do_atomic( 'before_content' ); // hatch_pro_before_content ?> | |
<div id="content"> | |
<?php do_atomic( 'open_content' ); // hatch_pro_open_content ?> | |
<div class="hfeed"> | |
<?php | |
$args = array ( | |
'posts_per_page' => get_option( 'posts_per_page' ), | |
'paged' => ( get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1 ) | |
); | |
$wp_query = new WP_Query( $args ); | |
?> | |
<?php if ( $wp_query->have_posts() ) : ?> | |
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> | |
<?php do_atomic( 'before_entry' ); // hatch_pro_before_entry ?> | |
<div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>"> | |
<?php do_atomic( 'open_entry' ); // hatch_pro_open_entry ?> | |
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?> | |
<div class="entry-content"> | |
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'hatch-pro' ) ); ?> | |
<?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'hatch-pro' ), 'after' => '</p>' ) ); ?> | |
</div><!-- .entry-content --> | |
<?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">[entry-edit-link]</div>' ); ?> | |
<?php do_atomic( 'close_entry' ); // hatch_pro_close_entry ?> | |
</div><!-- .hentry --> | |
<?php do_atomic( 'after_entry' ); // hatch_pro_after_entry ?> | |
<?php do_atomic( 'after_singular' ); // hatch_pro_after_singular ?> | |
<?php endwhile; ?> | |
<?php else : ?> | |
<?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?> | |
<?php endif; ?> | |
</div><!-- .hfeed --> | |
<?php do_atomic( 'close_content' ); // hatch_pro_close_content ?> | |
<?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?> | |
<?php wp_reset_postdata(); // Reset Query ?> | |
</div><!-- #content --> | |
<?php do_atomic( 'after_content' ); // hatch_pro_after_content ?> | |
<?php get_footer(); // Loads the footer.php template. ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment