<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
<?php if ( is_home() ) { ?>
<div class="spacer"></div>
<?php } ?>
<?php
if (have_posts()) :
$post = $posts[0]; // Hack. Set $post so that the_date() works.
if (is_category()) { /* If this is a category archive */ ?>
<h1 class="archivetitle"><?php echo single_cat_title(); ?></h1>
<?php } elseif (is_day()) { /* If this is a daily archive */ ?>
<h1 class="archivetitle"><?php the_time('F jS, Y'); ?></h1>
<?php } elseif (is_month()) { /* If this is a monthly archive */ ?>
<h1 class="archivetitle"><?php the_time('F, Y'); ?></h1>
<?php } elseif (is_year()) { /* If this is a yearly archive */ ?>
<h1 class="archivetitle"><?php the_time('Y'); ?> </h1>
<?php } elseif (is_search()) { /* If this is a search */ ?>
<h1 class="archivetitle">Resultado(s) da busca</h1>
<?php } elseif (is_author()) { /* If this is an author archive */ ?>
<h1 class="archivetitle">Autor</h1>
<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { /* If this is a paged archive */ ?>
<h1 class="archivetitle">Arquivos</h1>
<?php } elseif (is_tag()) { /* If this is a tag archive */ ?>
<h1 class="archivetitle">Tag-Archive for ◊ <?php single_tag_title(); ?></h1>
<?php }
while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>">
<div class="post-top"></div>
<div class="post"><div class="post-content">
<div class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="Link permanente para<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<div class="date">
<?php the_time('j \d\e F \d\e Y') ?> | Autor: <?php the_author_posts_link('nickname'); ?>
<?php edit_post_link(' » Editar «','|',''); ?>
</div>
</div>
<div class="entry">
<?php if (is_search()){
the_excerpt();
}else{
the_content('Leia mais...');
}
?>
</div>
<div class="info">
<span class="category">Categoria(s): <?php the_category(', ') ?></span> |
<?php if(is_archive()){ the_tags('<span class="tags">Tags: ', ', ', '</span> | ');} ?>
<span class="bubble"><?php comments_popup_link('Comente','Um Comentário', '% Comentários', '','Sem comentários'); ?></span>
</div>
</div></div>
<div class="post-bottom"></div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Próximos') ?></div>
<div class="alignright"><?php previous_posts_link('Anteriores »') ?></div>
</div>
<?php else : ?>
<h1>Não encontrado</h1>
<p class="sorry">"Sorry, but you are looking for something that isn't here. Try something else.</p>
<?php endif; ?>
</div>
<?php get_footer();?>