Skip to content

Instantly share code, notes, and snippets.

@dannymichel
Created October 3, 2012 01:00
Show Gist options
  • Save dannymichel/3824294 to your computer and use it in GitHub Desktop.
Save dannymichel/3824294 to your computer and use it in GitHub Desktop.
<?php get_header(); ?>
<div id="primary" class="content-area">
<section id="content" class="container" role="main">
<div id="article-grid">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article class="<?php if ( in_category( 'featured' )) { echo ' featured entries'; } else { echo ' normal entries'; } ?>">
<a href="<?php the_permalink(); ?>"><?php if ( in_category( 'featured' )) { echo the_post_thumbnail('home_thumbmail'); } else { echo the_post_thumbnail('level_two'); } ?></a>
<h3><?php
$category = get_the_category();
echo $category[0]->cat_name;
?></h3>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php wpe_excerpt('wpe_excerptlength_index', 'wpe_excerptmore'); ?>
</article>
<?php endwhile; ?>
<?php varmag_content_nav( 'nav-below' ); ?>
<?php elseif ( current_user_can( 'edit_posts' ) ) : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</div>
</section><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment