Skip to content

Commit

Permalink
actually add archive
Browse files Browse the repository at this point in the history
  • Loading branch information
gabestein committed Dec 7, 2014
1 parent 25e3f2b commit c54d00d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php get_header(); ?>
<?php

if(is_author()) {
$title = get_the_author();
} else {
$title = single_tag_title('', false);
}

?>
<article class="tag">
<header>
<h1><?php echo $title; ?></h1>
</header>
<?php if ( have_posts() ) { ?>
<div class="card container">
<?php while ( have_posts() ) {
the_post();
article_card(get_the_id());
}
?>
<div class="navigation">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>

<div class="alignleft"><?php next_posts_link('&larr; Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries &rarr;') ?></div>
<?php } ?>
</div>
</div>
<?php } else {
get_404();
} ?>
</article>
<?php get_footer(); ?>

0 comments on commit c54d00d

Please sign in to comment.