Created
October 3, 2012 00:44
-
-
Save dannymichel/3824246 to your computer and use it in GitHub Desktop.
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 get_header(); ?> | |
<div id="primary" class="content-area"> | |
<section id="content" class="container" role="main"> | |
<div id="article-grid"> | |
<div class="entries category-split"></div> | |
<?php if ( have_posts() ) : ?> | |
<?php $categories = get_categories('hide_empty=1'); foreach ($categories as $category) : query_posts('showposts=2&cat='.$category->cat_ID); 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 endforeach; ?> | |
<?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