-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
77 lines (63 loc) · 1.55 KB
/
single.php
File metadata and controls
77 lines (63 loc) · 1.55 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
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* The template for a single page
*
* @package WordPress
* @subpackage Kioru
*/
get_header(); ?>
<?php if (is_active_sidebar('header_blog')) : ?>
<div class="header_blog">
<?php dynamic_sidebar('header_blog'); ?>
</div>
<?php endif; ?>
<?php if (is_active_sidebar('top1')) : ?>
<div class="top1">
<?php dynamic_sidebar('top1'); ?>
</div>
<?php endif; ?>
<?php if (is_active_sidebar('top2')) : ?>
<div class="top2">
<div class="container">
<?php dynamic_sidebar('top2'); ?>
</div>
</div>
<?php endif; ?>
<div class="container">
<div class="col-sm-12 blog-post">
<?php
if ( have_posts() ) : while ( have_posts() ) : the_post();
get_template_part( 'content-single', get_post_format() );
endwhile; endif;
?>
</div> <!-- /.col -->
</div>
<?php if (is_active_sidebar('top6')) : ?>
<div class="top6">
<div class="container">
<div class="col-lg-12">
<?php dynamic_sidebar('top6'); ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (is_active_sidebar('top8')) : ?>
<div class="top8">
<div class="container">
<div class="col-lg-12">
<h2>Article recommandés:</h2>
<ul>
<?php
$args = array( 'numberposts' => '5' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '<li><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"] .'</a> </li> ';
}
wp_reset_query();
?>
</ul>
</div>
</div>
</div>
<?php endif; ?>
<?php get_footer(); ?>