-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposts.php
67 lines (60 loc) · 2.88 KB
/
posts.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
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php theme_include('header'); ?>
<section class="posts">
<?php if(has_posts()): ?>
<?php $i = 0; while(posts()): ?>
<article>
<header>
<figure>
<a href="<?php echo article_url(); ?>">
<img src="<?php echo article_custom_field('thumbnail'); ?>" />
</a>
<figcaption>
<h1><a href="<?php echo article_url(); ?>"><?php echo article_title(); ?></a></h1>
<p>
Publié le
<time datetime="<?php echo date('c', article_time()); ?>" pubdate>
<?php
$months = array(
'January' => 'Janvier',
'February' => 'Février',
'March' => 'Mars',
'April' => 'Avril',
'May' => 'Mai',
'June' => 'Juin',
'July' => 'Juillet',
'August' => 'Août',
'September' => 'Septembre',
'October' => 'Octobre',
'November' => 'Novembre',
'December' => 'Décembre'
);
echo strtr(date('d F Y à H:i', article_time()), $months);
?>
</time>
par <a href="#" rel="author"><?php echo article_author(); ?></a>.
</p>
<?php if(comments_open()): ?>
<p class="comments"><span><?php echo my_total_comments(); ?></span> <?php echo pluralise(my_total_comments(), 'commentaire'); ?></p>
<?php endif; ?>
</figcaption>
</figure>
</header>
<div class="content">
<p><?php echo article_description(); ?></p>
<p><a href="<?php echo article_url(); ?>">Lire la suite...</a></p>
</div>
</article>
<?php endwhile; ?>
<?php if(has_pagination()): ?>
<nav class="pagination">
<div class="wrap">
<span class="left"><?php echo posts_prev('< Précédents'); ?></span>
<span class="right"><?php echo posts_next('Suivants >'); ?></span>
</div>
</nav>
<?php endif; ?>
<?php else: ?>
<p>Apparemment ce blog est vide...</p>
<?php endif; ?>
</section>
<?php theme_include('footer'); ?>