-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage-news.php
67 lines (45 loc) · 1.91 KB
/
page-news.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
62
63
64
65
66
67
<?php get_header(); ?>
<div class="content">
<?php $banner = get_field('portfolio_page_banner'); ?>
<div class="pg_banner" style="background-image: url('<?php echo $banner['url']; ?>')">
<div class="overlay"></div>
</div>
<div class="section">
<div class="inner-wrap -js_anime">
<div class="pg_title">Newsroom</div>
<div class="news_sort">
<ul class="clearfix">
<li class="news_item" id="all">All</li>
<li class="news_item" id="blog">Blog</li>
<li class="news_item" id="media">Media</li>
<li class="news_item" id="insight">Insights</li>
</ul>
</div>
<div class="newsroom_hld -js_anime clearfix">
<?php
$args = array(
'post_type' => 'newsroom'
);
$news = new WP_Query($args);
while($news->have_posts()) {
$news->the_post();
?>
<div class="news_wrap <?php echo get_post_meta(get_the_ID(), 'news_type', true); ?>">
<div class="news_des clearfix">
<?php $date = get_post_meta(get_the_ID(), 'news_date', true)?>
<div class="news_date"><?php echo date('F d, Y', strtotime($date)); ?></div>
<div class="news_cat"><?php echo get_post_meta(get_the_ID(), 'news_type', true); ?></div>
</div>
<a href="<?php the_permalink();?>">
<div class="news_title"><?php the_title();?></div>
<div class="news_det"><?php echo wp_trim_words(get_post_meta(get_the_ID(), 'news_text', true), 35); ?></div>
</a>
</div>
<?php
} wp_reset_query();
?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>