<?php get_header(); ?>
<div class="col-md-8">
<?php if( have_posts() ) : ?>
<div id="archive">
<?php $post = $posts[0]; ?>
<?php if ( is_category() ) { ?>
<p class="info">Archivio per la categoria : <?php single_cat_title(); ?></p>
<?php } elseif( is_tag() ) { ?>
<p class="info">Archivio per il tag : <?php single_tag_title(); ?></p>
<?php } elseif ( is_day() ) { ?>
<p class="info">Archivio per il giorno : <?php the_time('F jS, Y'); ?></p>
<?php } elseif ( is_month() ) { ?>
<p class="info">Archivio per il mese : <?php the_time('F, Y'); ?></p>
<?php } elseif ( is_year() ) { ?>
<p class="info">Archivio per l'annn :o <?php the_time('Y'); ?></p>
<?php } elseif ( is_author() ) { ?>
<p class="info">Archivio per l'autore : <?php the_author_link(); ?></p>
<?php } ?>
</div>
<?php while( have_posts() ) : the_post(); ?>
<div id="post">
<a href="<?php the_permalink() ?>"><h1><?php the_title(); ?></h1></a>
<div class="meta"> Postato il <?php echo get_the_date(); ?> in <?php the_category(','); ?> da <?php the_author_posts_link(); ?></div>
<div class="content">
<?php the_excerpt(); ?>
</div>
</div>
<?php endwhile; ?>
<div class="pagination">
<?php if (function_exists("pagination")) {
pagination();
} ?>
</div>
<?php else : ?>
<!-- Messaggio di Errore -->
<p>Errore dato non trovato</p>
<?php endif; ?>
</div>
<!-- Fine Content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>