-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
65 lines (56 loc) · 2.47 KB
/
single.php
File metadata and controls
65 lines (56 loc) · 2.47 KB
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
<?php
get_header();
?>
<section class="hi">
<div class="text">
<h2 title="blog" role="heading" aria-level="2">Blog</h2>
<p>Voici mon blog. Enjoy!</p>
</div>
</section>
<section class="news blog">
<h2 class="hidden">Article</h2>
<article>
<?php if(have_posts()): ?>
<?php while(have_posts()): the_post(); ?>
<h3 class="post" role="heading" aria-level="3">
<?php the_title() ?> <span><time date="<?php the_time('Y-m-d') ?>" pubdate><?php echo(get_the_date()) ?></time></span>
</h3>
<span>Catégorie(s) : <?php the_category('/'); ?></span>
<div class="post-content"><?php the_content() ?></div>
<?php $bloginfo = get_bloginfo('template_url'); // adresse du blog
$titre=get_the_title(); // titre de l'article
$pmlink=get_permalink(); // adresse de l'article ?>
<h4 role="heading" aria-level="4">
Partager l'article
</h4>
<a class="social partage-facebook facebook" href="http://www.facebook.com/share.php?u=<?php echo $pmlink; ?>" target="blank" rel="nofollow" ><i class="icon-facebook-circled-1"></i></a>
<a class="social partage-twitter twitter" href="http://twitter.com/home?status=<?php echo $pmlink; ?>" target="blank" rel="nofollow" ><i class="icon-twitter-circled-1"></i></a>
<a class="social partage-google google" href="https://plus.google.com/share?url=<?php echo $pmlink; ?>" target="blank" rel="nofollow" ><i class="icon-gplus-circled-1"></i></a>
<a class="social partage-mail mail" href="mailto:?subject=Article sur <?php bloginfo('name'); ?>&body=Un article interessant sur <?php bloginfo('name'); ?> : <?php echo $titre;?>... Adresse : <?php echo $pmlink; ?>" rel="nofollow" ><i class="icon-mail-circled"></i></a>
<?php endwhile; ?>
<?php endif; ?>
<div class="comment">
<h4 id="comm" class="comm">Commentaires</h4>
<?php comments_template() ?>
</div>
</article>
<div id="position">
<?php wp_list_categories(array('title_li' => __( '<h3><i class="icon-tag"></i>Catégories</h3>' ))); ?>
<li class="categories">
<h3><i class="icon-bookmarks"></i> Derniers articles</h3>
<ul>
<?php
$recentPosts = new WP_Query();
$recentPosts->query('showposts=5');
?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
</li>
<a href="blog/"><i class="icon-forward"></i> Retourner à la section blog</a>
</div>
</section>
<?php
get_footer();
?>