-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate-resources.php
More file actions
165 lines (150 loc) · 8.42 KB
/
template-resources.php
File metadata and controls
165 lines (150 loc) · 8.42 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
161
162
163
164
165
<?php
/**
* Template Name: Resources
*/
get_header(); ?>
<?php
$page = get_queried_object();
$ID = $page->ID;
$title = $page->post_title;
$sub_title = get_post_meta($ID, 'page_subtitle', true);
if ($sub_title){
echo'<section id="title" class="emerald-home"><div class="container"><div class="row"><div class="col-sm-12"><p>'.$sub_title.'</p></div></div></div></section>';
}
?>
<section id="resources-content" class="white-box">
<img class="left-circle" alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/left-circle.png">
<img class="right-circle" alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/right-circle.png">
<div class="container">
<div class="row">
<div class="col-sm-8">
<div class="box-resource">
<h2 style="color:#"><a href="<?php echo get_bloginfo('url') ?>/resources/reports" title="Reports and Documents"><img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/ico_reports.png"><span>Reports and Documents</span></a></h2>
<?php
$queryObject = new WP_Query( 'post_type=reports&posts_per_page=4&orderby=date&order=DESC' );
// The Loop!
if ($queryObject->have_posts()) {
?>
<?php
while ($queryObject->have_posts()) {
$queryObject->the_post();
?>
<div class="col-sm-12 blog" style="margin-bottom: 25px; padding-bottom: 25px;">
<div class="col-sm-12 nopadding" style="margin-bottom: 15px;"><div class="col-sm-3 nopadding"><a href="<?php the_field('file'); ?>"><img alt="" src="<?php the_field('icon'); ?>"></a></div></div>
<h3 class="entry-title">
<div class="date-post">
<span class="day-post"><?php echo get_the_date('d'); ?></span>
<span class="month-post"><?php echo get_the_date('M'); ?></span>
</div>
<a href="<?php the_field('file'); ?>" rel="bookmark"><?php the_title(); ?></a>
<?php if ( is_sticky() && is_home() && ! is_paged() ) { ?>
<sup class="featured-post"><?php _e( 'Sticky', ZEETEXTDOMAIN ) ?></sup>
<?php } ?>
<?php edit_post_link( __( 'Edit', ZEETEXTDOMAIN ), '<small class="edit-link pull-right">', '</small>' ); ?>
</h3>
<?php echo '<p>' . get_the_content() . '</p>'; ?>
</div>
<?php
}
?>
<?php
}
?>
</div>
<div class="box-resource">
<h2><a href="<?php echo get_bloginfo('url') ?>/resources/videos" title="Videos"><img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/ico_video2.png"><span>Videos</span></a></h2>
<?php
$queryObject = new WP_Query( 'post_type=videos&posts_per_page=2&orderby=date&order=DESC' );
// The Loop!
if ($queryObject->have_posts()) {
?>
<?php
while ($queryObject->have_posts()) {
$queryObject->the_post();
?>
<div class="col-sm-12 blog" style="margin-bottom: 25px; padding-bottom: 25px;">
<h3 class="entry-title">
<div class="date-post">
<span class="day-post"><?php echo get_the_date('d'); ?></span>
<span class="month-post"><?php echo get_the_date('M'); ?></span>
</div>
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
<?php if ( is_sticky() && is_home() && ! is_paged() ) { ?>
<sup class="featured-post"><?php _e( 'Sticky', ZEETEXTDOMAIN ) ?></sup>
<?php } ?>
<?php edit_post_link( __( 'Edit', ZEETEXTDOMAIN ), '<small class="edit-link pull-right">', '</small>' ); ?>
</h3>
<div class="entry-content" >
<div class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php echo '<p>' . wp_trim_words( get_the_content(), 50 ); ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"></a>
<?php echo '</p>'; ?>
</div>
<iframe height="260" src="<?php the_field('video_id'); ?>" frameborder="0" allowfullscreen style="width: 100%;"></iframe>
</div>
<?php
}
?>
<?php
}
?>
</div>
<div class="box-resource">
<h2><a href="<?php echo get_bloginfo('url') ?>/resources/links" title="External Links"><img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/ico_external.png"><span>External Links</span></a></h2>
<?php
$queryObject = new WP_Query( 'post_type=links&posts_per_page=3&orderby=date&order=DESC' );
// The Loop!
if ($queryObject->have_posts()) {
?>
<?php
while ($queryObject->have_posts()) {
$queryObject->the_post();
?>
<div class="col-sm-12 blog" style="margin-bottom: 25px; padding-bottom: 25px;">
<h3 class="entry-title">
<div class="date-post">
<span class="day-post"><?php echo get_the_date('d'); ?></span>
<span class="month-post"><?php echo get_the_date('M'); ?></span>
</div>
<a href="<?php the_field('link'); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php if ( is_sticky() && is_home() && ! is_paged() ) { ?>
<sup class="featured-post"><?php _e( 'Sticky', ZEETEXTDOMAIN ) ?></sup>
<?php } ?>
<?php edit_post_link( __( 'Edit', ZEETEXTDOMAIN ), '<small class="edit-link pull-right">', '</small>' ); ?>
</h3>
<div class="entry-content" >
<div class="entry-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php echo '<p>' . wp_trim_words( get_the_content(), 50 ); ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"></a>
<?php echo '</p>'; ?>
</div>
</div>
<?php
}
?>
<?php
}
?>
</div>
</div>
<div id="sidebar" class="col-md-4" role="complementary">
<div class="sidebar-inner">
<aside class="widget-area">
<ul class="latest-resources">
<li><a href="<?php echo get_bloginfo('url') ?>/resources/reports" title="Reports and Documents"><img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/ico_reports.png"><span>Reports and Documents</span></a></li>
<li><a href="<?php echo get_bloginfo('url') ?>/resources/videos" title="Videos"><img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/ico_video2.png"><span>Videos</span></a></li>
<li><a href="<?php echo get_bloginfo('url') ?>/resources/links" title="External Links"><img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/ico_external.png"><span>External Links</span></a></li>
<li><a href="http://health-orb.org" title="ORB Platform"><img alt="" src="<?php echo get_stylesheet_directory_uri(); ?>/images/ORB-for-website.png"><span>ORB Platform</span></a></li>
</ul>
<br> <?php dynamic_sidebar( 'sidebar' ); ?>
</aside>
</div>
</div>
</div>
</div>
</section>
<?php get_footer();