-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-media.php
61 lines (57 loc) · 2.29 KB
/
page-media.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
<?php
/* Template Name: Media */
?>
<?php get_header()?>
<?php
$medias = new WP_Query(['post_type' => 'post', 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC']);
$count = 2;
?>
<section class="media_area">
<div class="container-fuild">
<div class="container">
<div class="row">
<div class="media_heading">
<!---<h2>Stories & Media</h2> -->
</div>
<?php
while ($medias->have_posts()):
$medias->the_post();
if($count%2 == 0):
?>
<div class="media_div" data-aos="">
<div class="right_media">
<a href="<?php the_permalink()?>">
<?php the_post_thumbnail('full', ['class' => 'img-responsive'])?>
</a>
</div>
<div class="left_media">
<p class="blog_date"><span><?php the_date()?></span> </p>
<p class="blog_content">
<a href="<?php the_permalink()?>"><?php the_title()?></a>
</p>
<p class="blog_btn"><a href="<?php the_permalink()?>">READ MORE</a></p>
<div class="blog_line"></div>
</div>
</div>
<?php $count++; else:?>
<div class="media_div media_div2" data-aos="">
<div class="right_media">
<a href="<?php the_permalink()?>">
<?php the_post_thumbnail('full', ['class' => 'img-responsive'])?>
</a>
</div>
<div class="left_media">
<p class="blog_date"><span><?php the_date()?></span> </p>
<p class="blog_content">
<a href="<?php the_permalink()?>"><?php the_title()?></a>
</p>
<p class="blog_btn"><a href="<?php the_permalink()?>">READ MORE</a></p>
<div class="blog_line"></div>
</div>
</div>
<?php $count++; endif; endwhile; wp_reset_query()?>
</div>
</div>
</div>
</section>
<?php get_footer()?>