-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-features.php
More file actions
79 lines (62 loc) · 2.93 KB
/
page-features.php
File metadata and controls
79 lines (62 loc) · 2.93 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
<?php
/*
Template Name: Features
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<div id="qa-block" class="bg-82 dark-teal-hover">
<div class="articles">
<?php
$args = array('post_type'=>'post', 'category_name'=>'q-and-a', 'posts_per_page'=>1);
$qa_posts = new WP_Query($args);
while ( $qa_posts->have_posts() ) : $qa_posts->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('clear'); ?>>
<div class="qa-text width-25">
<h2>Q&A</h2>
<p class="big view-all"><a href="<?php echo(site_url('/category/q-and-a')); ?>" title="See all Q and A features" >SEE ALL</a></p>
<h6><?php the_date('F j, Y'); ?></h6>
<p class="big"><a href="<?php the_permalink(); ?>"><?php echo('<em>'.get_field('feature_related_film').'</em> – '.get_the_title()); ?></a></p>
</div>
<div class="qa-image width-75">
<?php the_post_thumbnail(); ?>
</div>
</article><!-- #post-## -->
<?php endwhile; wp_reset_query(); ?>
</div>
</div>
<div id="news-block" class="width-50 bg-84 blue-hover">
<div class="articles">
<h2>News</h2>
<p class="big view-all"><a href="<?php echo(site_url('/category/news')); ?>" title="See all News features" >SEE ALL</a></p>
<?php
$args = array('post_type'=>'post', 'category_name'=>'news', 'posts_per_page'=>4);
$news_posts = new WP_Query($args);
while ( $news_posts->have_posts() ) : $news_posts->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h6><?php the_date('F Y'); ?></h6>
<p><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
</article><!-- #post-## -->
<?php endwhile; wp_reset_query(); ?>
</div>
</div>
<div id="archives-block" class="width-50 bg-86 light-blue-hover">
<div class="articles">
<h2>From the Archives</h2>
<p class="big view-all"><a href="<?php echo(site_url('/category/from-the-archive')); ?>" title="See all From The Archive features" >SEE ALL</a></p>
<?php
$args = array('post_type'=>'post', 'category_name'=>'from-the-archive', 'posts_per_page'=>1);
$news_posts = new WP_Query($args);
while ( $news_posts->have_posts() ) : $news_posts->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h6><?php the_date('F Y'); ?></h6>
<p class="big"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
<?php the_excerpt(); ?>
<p class="big"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">READ THE FULL ARTICLE</a></p>
</article><!-- #post-## -->
<?php endwhile; wp_reset_query(); ?>
</div>
</div>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>