-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-sidebar.php
More file actions
113 lines (103 loc) · 3.12 KB
/
single-sidebar.php
File metadata and controls
113 lines (103 loc) · 3.12 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<div class="my-3 border border-gray-200 mb-3 mb-lg-0 p-2 w-100 sport-nieuws">
<ul class="top-item mt-1 list-group list-group-flush">
<h5 class="text-uppercase">SPORT</h5>
<?php
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'category_name' => 'sport-nieuws',
'posts_per_page' => 4,
);
$arr_posts = new WP_Query( $args );
if ( $arr_posts->have_posts() ) :
while ( $arr_posts->have_posts() ) :
$arr_posts->the_post();
?>
<li class="list-group-item px-0 ">
<a href="<?php the_permalink(); ?>" class="d-block d-flex align-items-center">
<?php
$image = get_field('cover_image');
if( !empty($image) ): ?>
<amp-img
class="mr-2"
src="<?php echo $image['url']; ?>"
srcset="<?php echo $image['url']; ?> 640w,
<?php echo $image['url']; ?> 320w"
width="50"
height="50"
layout="responsive"
alt="<?php the_title(); ?>">
</amp-img>
<?php endif; ?>
<small class="sidebar-small">
<?php
$excerpt= get_the_excerpt();
echo substr($excerpt, 0, 70);
echo "...";
?>
</small>
</a>
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>
<div class="my-3 text-center w-100">
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-7475749348053006"
data-ad-slot="5185845556"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
</div>
<div class="my-3 border border-gray-200 mb-3 mb-lg-0 p-2 w-100 video-nieuws">
<ul class="video-item mt-1 list-group list-group-flush">
<h5 class="text-uppercase">Marokko</h5>
<?php
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'category_name' => 'video-nieuws',
'posts_per_page' => 4,
);
$arr_posts = new WP_Query( $args );
if ( $arr_posts->have_posts() ) :
while ( $arr_posts->have_posts() ) :
$arr_posts->the_post();
?>
<li class="list-group-item px-0 ">
<a class="d-block d-flex align-items-center" href="<?php the_permalink(); ?>">
<i class="material-icons mx-auto position-absolute">
play_circle_outline
</i>
<?php
$image = get_field('cover_image');
if( !empty($image) ): ?>
<amp-img
class="mr-2"
src="<?php echo $image['url']; ?>"
srcset="<?php echo $image['url']; ?> 640w,
<?php echo $image['url']; ?> 320w"
width="50"
height="50"
layout="responsive"
alt="<?php the_title(); ?>">
</amp-img>
<?php endif; ?>
<small class="sidebar-small">
<?php
$excerpt= get_the_excerpt();
echo substr($excerpt, 0, 70);
echo "...";
?>
</small>
</a>
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>