-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibrary.php
100 lines (98 loc) · 3.01 KB
/
library.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
/*
* Template name: Library page
*/
?>
<?php get_header(); ?>
<article id="page">
<?php
$story_map = arp_get_story_map_url();
$story_map_type = arp_get_story_map_type();
if($story_map) : ?>
<?php if($story_map_type == 'iframe') : ?>
<header class="page-header">
<div class="container">
<div class="twelve columns">
<section id="story-map">
<?php echo arp_get_story_map(); ?>
</section>
</div>
</div>
</header>
<?php elseif($story_map_type == 'youtube') : ?>
<header class="page-header video">
<section id="story-map" class="video">
<?php echo arp_get_story_map(); ?>
</section>
</header>
<?php endif; ?>
<?php endif; ?>
<?php
$news_id = get_cat_ID('news');
$news_link = get_category_link($news_id);
query_posts('posts_per_page=3&category_name=news');
if(have_posts()) :
?>
<section id="latest" class="page-section">
<div class="container">
<div class="twelve columns">
<h2 class="section-title"><?php _e('Latest news', 'apca'); ?> <a class="button" href="<?php echo $news_link ?>"><?php _e('View all news', 'apca'); ?></a></h2>
</div>
</div>
<div class="post-list latest-list">
<div class="container">
<?php
while(have_posts()) :
the_post();
?>
<div class="four columns">
<article class="post-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('wide-thumbnail'); ?></a>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
</article>
</div>
<?php
endwhile;
?>
</div>
</div>
</section>
<?php
endif;
wp_reset_query();
?>
<div class="container">
<div class="twelve columns">
<?php
$publications_id = get_cat_ID('publications');
$publications_link = get_category_link($publications_id);
query_posts('posts_per_page=3&category_name=publications');
if(have_posts()) :
?>
<section id="publications" class="page-section">
<h2 class="section-title"><?php _e('Publications', 'apca'); ?> <a class="button" href="<?php echo $publications_link ?>"><?php _e('View all publications', 'apca'); ?></a></h2>
<?php
while(have_posts()) :
the_post();
?>
<article class="post-item clearfix">
<div class="three columns">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
</div>
<div class="nine columns">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
</div>
</article>
<?php
endwhile;
?>
</section>
<?php
endif;
wp_reset_query();
?>
</div>
</div>
</article>
<?php get_footer(); ?>