Skip to content

Instantly share code, notes, and snippets.

@billrobbins
Forked from anonymous/Category.php
Last active March 3, 2016 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billrobbins/b5d8f5fa756e28db8b7a to your computer and use it in GitHub Desktop.
Save billrobbins/b5d8f5fa756e28db8b7a to your computer and use it in GitHub Desktop.
<?php
/**
* Category
*
* Creates the structure of a category archive
*
* @package WordPress
* @subpackage Elite
* @since Custom
*/
get_header(); ?>
<div id="content" class="site-content" role="main">
<?php the_archive_description( '<div class="category-description">', '</div>' ); ?>
<?php if ( have_posts() ) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'elite' ), the_title_attribute( 'echo=0' ) ) ); ?>"><img src="<?php echo get_post_meta( $post->ID, "blog-image", TRUE ); ?>" /></a>
<h2 class="category-post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'elite' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php the_title(); ?></a></h2>
</article>
<?php endwhile ; else : ?>
<?php get_template_part( 'layouts/not-found' ); ?>
<?php endif ; ?>
<?php get_template_part( 'layouts/pagination' ); ?>
</div><!-- #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment