-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
54 lines (51 loc) · 2.18 KB
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php get_header(); ?>
<div id="content">
<?php if(have_posts()): ?>
<h2 class="page-title">
<?php
if(is_category()){
single_cat_title();
} elseif(is_tag()){
echo 'Posts com a tag <strong>'; single_tag_title(); echo '</strong>';
} elseif(is_day()){
echo 'Arquivo de '; the_time('d F, Y');
} elseif(is_month()){
echo 'Arquivo de '; the_time('F, Y');
} elseif(is_year()){
echo 'Arquivo de '; the_time('Y');
} elseif(is_author()){
echo 'Arquivo do autor';
} elseif(isset($_GET['paged']) && !empty($_GET['paged'])){
echo 'Arquivos do blog';
}
?>
</h2>
<?php while(have_posts()): the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h1 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<p class="post-meta">Postado em <?php the_time('j/m/y'); ?>, em <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); comments_popup_link('Sem comentários »', '1 comentário »', '% comentários »'); ?></p>
<div class="entry">
<?php the_content('Leia o resto deste post »'); ?>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Posts mais antigos') ?></div>
<div class="alignright"><?php previous_posts_link('Posts mais novos »') ?></div>
</div>
<?php if(function_exists("get_numeric_pagination")) get_numeric_pagination(); ?>
<?php else :
if(is_category()){ // If this is a category archive
printf("<p class='msg-info'>Não há nenhum post na categoria '%s' ainda.</p>", single_cat_title('',false));
} else if(is_date()){ // If this is a date archive
echo("<p class='msg-info'>Não há nenhum post com esta data.</p>");
} else if(is_author()){ // If this is a category archive
$userdata = get_userdatabylogin(get_query_var('author_name'));
printf("<p class='msg-info'>Não há nenhum post por %s ainda.</p>", $userdata->display_name);
} else {
echo("<p class='msg-info'>Nenhum post encontrado.</p>");
}
endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>