-
Notifications
You must be signed in to change notification settings - Fork 6
/
section-content-summary.php
83 lines (83 loc) · 2.88 KB
/
section-content-summary.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<div class="container">
<?php
$briefing_query = new WP_Query(array('post_type' => 'briefing', 'posts_per_page' => 3));
if($briefing_query->have_posts()) :
?>
<div class="nine columns">
<section id="briefs" class="list">
<div class="section-title">
<h2><a href="<?php echo get_post_type_archive_link('briefing'); ?>"><?php _e('Issue briefs', 'opendev'); ?></a></h2>
</div>
<?php
while($briefing_query->have_posts()) :
$briefing_query->the_post();
?>
<article id="briefing-<?php the_ID(); ?>" class="row">
<header>
<div class="two columns alpha">
<?php if(has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<?php else : ?>
<?php endif; ?>
</div>
<div class="three columns">
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<p><span class="icon-calendar"></span> <?php echo get_the_date(); ?></p>
<p><span class="icon-user"></span> <?php the_author(); ?></p>
</div>
</header>
<div class="four columns omega">
<?php the_excerpt(); ?>
</div>
</article>
<?php endwhile; ?>
<a class="button main-section-link" href="<?php echo get_post_type_archive_link('briefing'); ?>"><?php _e('Access the briefings archive', 'opendev'); ?></a>
</section>
</div>
<?php endif; ?>
<div class="three columns">
<?php
$updates_query = new WP_Query(array('post_type' => 'site-update', 'posts_per_page' => 5));
if($updates_query->have_posts()) :
?>
<section id="site-updates">
<div class="section-title">
<h2><?php _e('Site updates', 'opendev'); ?></h2>
</div>
<div class="update-list">
<?php
while($updates_query->have_posts()) :
$updates_query->the_post();
?>
<article id="update-<?php the_ID(); ?>">
<p class="date"><?php echo get_the_date(); ?></p>
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
</article>
<?php endwhile; ?>
</div>
</section>
<?php endif; ?>
<?php
$updates_query = new WP_Query(array('post_type' => 'announcement', 'posts_per_page' => 5));
if($updates_query->have_posts()) :
?>
<section id="announcements">
<div class="section-title">
<h2><?php _e('Events and opportunities', 'opendev'); ?></h2>
</div>
<div class="announce-list">
<?php
while($updates_query->have_posts()) :
$updates_query->the_post();
?>
<article id="announcement-<?php the_ID(); ?>">
<p class="date"><?php echo get_the_date(); ?></p>
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
</article>
<?php endwhile; ?>
</div>
</section>
<?php endif; ?>
</div>
</div>