-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
164 lines (137 loc) · 4.72 KB
/
sidebar.php
File metadata and controls
164 lines (137 loc) · 4.72 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<div class="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) ): ?>
<img class="mr-2" src="<?php echo $image['url']; ?>" alt="<?php the_title(); ?>" />
<?php endif; ?>
<small class="sidebar-small">
<?php echo wp_trim_words( get_the_title(), 10 ); ?>
<span class="time-and-date">
<?php $post_date = get_the_date( 'j M Y' ); echo $post_date; ?> | <?php the_time('H:i') ?>
</span>
</small>
</a>
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>
<div class="my-3">
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-7475749348053006"
data-ad-slot="3516906200"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div class="my-3 border border-gray-200 mb-3 mb-lg-0 p-2 w-100 entertainment-nieuws d-none d-lg-block">
<ul class="entertainment-item mt-1 list-group list-group-flush">
<h5 class="text-uppercase">Entertainment</h5>
<?php
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'category_name' => 'entertainment',
'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(); ?>">
<?php
$image = get_field('cover_image');
if( !empty($image) ): ?>
<img class="mr-2" src="<?php echo $image['url']; ?>" alt="<?php the_title(); ?>" />
<?php endif; ?>
<small class="sidebar-small">
<?php echo wp_trim_words( get_the_title(), 10 ); ?>
<span class="time-and-date">
<?php $post_date = get_the_date( 'j M Y' ); echo $post_date; ?> | <?php the_time('H:i') ?>
</span>
</small>
</a>
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>
<?php get_template_part( 'components/exposed' ); ?>
<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' => 'toerisme','marokkogids',
'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(); ?>">
<?php
$image = get_field('cover_image');
if( !empty($image) ): ?>
<img class="mr-2" src="<?php echo $image['url']; ?>" alt="<?php the_title(); ?>" />
<?php endif; ?>
<small class="sidebar-small">
<?php echo wp_trim_words( get_the_title(), 10 ); ?>
<span class="time-and-date">
<?php $post_date = get_the_date( 'j M Y' ); echo $post_date; ?> | <?php the_time('H:i') ?>
</span>
</small>
</a>
</li>
<?php
endwhile;
endif;
?>
</ul>
</div>
<div class="my-3 p-3 border border-gray-200">
<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>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div class="my-3 p-3 text-center w-100 nieuwsbrief bg-gray-200">
<h5>Nieuwsbrief</h5>
<small>Blijf op de hoogte van het nieuws en acties op MarocMagazine.</small><br/>
<small>Geef hieronder je e-mail adres op:</small>
<?php echo do_shortcode("[mc4wp_form id='2624']"); ?>
</div>