136
|
1 |
<?php |
|
2 |
/** |
|
3 |
* @package WordPress |
|
4 |
* @subpackage Default_Theme |
|
5 |
*/ |
|
6 |
|
|
7 |
get_header(); |
|
8 |
?> |
|
9 |
|
|
10 |
<div id="content" class="narrowcolumn" role="main"> |
|
11 |
<?php if (have_posts()) : ?> |
|
12 |
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> |
|
13 |
<?php /* If this is a category archive */ if (is_category()) { ?> |
|
14 |
<h2 class="pagetitle">Archive pour la catégorie ‘<?php single_cat_title(); ?>’</h2> |
|
15 |
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> |
|
16 |
<h2 class="pagetitle">Archive pour le mot-clef ‘<?php single_tag_title(); ?>’</h2> |
|
17 |
<?php /* If this is a daily archive */ } elseif (is_day()) { ?> |
|
18 |
<h2 class="pagetitle">Archive pour <?php the_time('j F Y'); ?></h2> |
|
19 |
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?> |
|
20 |
<h2 class="pagetitle">Archive pour <?php the_time('F Y'); ?></h2> |
|
21 |
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?> |
|
22 |
<h2 class="pagetitle">Archive pour <?php the_time('Y'); ?></h2> |
|
23 |
<?php /* If this is an author archive */ } elseif (is_author()) { ?> |
|
24 |
<h2 class="pagetitle">Archive par auteur </h2> |
|
25 |
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> |
|
26 |
<h2 class="pagetitle">Archives du blog </h2> |
|
27 |
<?php } ?> |
|
28 |
|
|
29 |
<div class="navigation"> |
|
30 |
<div class="alignleft"><?php next_posts_link('« Articles plus anciens') ?></div> |
|
31 |
<div class="alignright"><?php previous_posts_link('Articles plus récents »') ?></div> |
|
32 |
</div> |
|
33 |
|
|
34 |
<?php while (have_posts()) : the_post(); ?> |
|
35 |
|
|
36 |
<div <?php post_class() ?>> |
|
37 |
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Lien permanent vers <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> |
|
38 |
<small><?php the_time('l j F Y') ?></small> |
|
39 |
<div class="entry"> |
|
40 |
<?php the_content('Lire le reste de cet article »'); ?> |
|
41 |
</div> |
|
42 |
<p class="postmetadata"><?php the_tags('Mots-clefs : ', ', ', '<br />'); ?>Publié dans <?php the_category(', ') ?> | <?php edit_post_link('Modifier', '', ' | '); ?> <?php comments_popup_link('Aucun commentaire »', '1 commentaire »', '% commentaires »', 'comments-link', 'Les commentaires sont fermés'); ?></p> |
|
43 |
</div> |
|
44 |
|
|
45 |
<?php endwhile; ?> |
|
46 |
|
|
47 |
<div class="navigation"> |
|
48 |
<div class="alignleft"><?php next_posts_link('« Articles plus anciens') ?></div> |
|
49 |
<div class="alignright"><?php previous_posts_link('Articles plus récents »') ?></div> |
|
50 |
</div> |
|
51 |
<?php else : |
|
52 |
|
|
53 |
if ( is_category() ) { // If this is a category archive |
|
54 |
printf("<h2 class='center'>Désolé, mais il n'y a pas encore d'article dans la catégorie %s.</h2>", single_cat_title('',false)); |
|
55 |
} else if ( is_date() ) { // If this is a date archive |
|
56 |
echo("<h2>Désolé, mais aucun article ne correspond à cette date.</h2>"); |
|
57 |
} else if ( is_author() ) { // If this is a category archive |
|
58 |
$userdata = get_userdatabylogin(get_query_var('author_name')); |
|
59 |
printf("<h2 class='center'>Désolé, mais %s n'a pas encore écrit d'article.</h2>", $userdata->display_name); |
|
60 |
} else { |
|
61 |
echo("<h2 class='center'>Aucun article trouvé.</h2>"); |
|
62 |
} |
|
63 |
get_search_form(); |
|
64 |
|
|
65 |
endif; |
|
66 |
?> |
|
67 |
|
|
68 |
</div> |
|
69 |
|
|
70 |
<?php get_sidebar(); ?> |
|
71 |
<?php get_footer(); ?> |