-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.php
More file actions
88 lines (75 loc) · 2.72 KB
/
home.php
File metadata and controls
88 lines (75 loc) · 2.72 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
<?php
/**
The Home Page
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
$args = array('pagename'=>'home');
$home_page = new WP_Query($args);
while ($home_page->have_posts()) : $home_page->the_post();
?>
<div class="entry-media home bg-80 teal-hover">
<?php if(get_field('home_page_slides')) : ?>
<ul class="home-slides nbr-slider" data-slick='{ "prevArrow": ".slick-nav.prev", "nextArrow": ".slick-nav.next" }'>
<?php while (has_sub_field('home_page_slides')) : ?>
<?php
$post_object = get_sub_field('home_slide_link_object');
$post_link = $post_object->guid;
$post_title = $post_object->post_title;
?>
<li>
<div class="slide-image bg-86"><img src="<?php the_sub_field('home_slide_image'); ?>" alt="home slide image" /></div>
<div class="slide-content">
<?php if (get_sub_field('home_slide_title')) : ?>
<div class="h2">
<a href="<?php echo($post_link); ?>" title="<?php echo($post_title); ?>"><?php the_sub_field('home_slide_title'); ?></a>
</div>
<?php endif; ?>
<?php if (get_sub_field('home_slide_content_image')) { ?>
<div class="sponsor">
<h6><?php the_sub_field('home_slide_content_text'); ?></h6>
<img src="<?php the_sub_field('home_slide_content_image'); ?>"/>
</div>
<?php } ?>
<a href="<?php echo($post_link); ?>" title="<?php echo($post_title); ?>" class="slide-link big"><?php the_sub_field('home_slide_link_text'); ?></a>
</div>
</li>
<?php endwhile; ?>
</ul>
<div class="slick-nav-arrows">
<a href="#" class="slick-nav prev">Previous</a>
<a href="#" class="slick-nav next">Next</a>
</div>
<?php endif; ?>
</div>
<?php endwhile; ?>
<div class="home-features clear">
<div class="archives feature width-25">
<?php get_template_part('module-archives'); ?>
</div>
<div class="qa feature width-25">
<?php get_template_part('module-qa'); ?>
</div>
<div class="news feature width-50">
<?php get_template_part('module-news'); ?>
</div>
</div>
<div class="home-about clear">
<?php
$args = array('pagename'=>'home');
$home_page = new WP_Query($args);
while ($home_page->have_posts()) : $home_page->the_post();
?>
<div class="content width-75">
<div class="wrapper">
<?php the_field('home_about_content'); ?>
</div>
</div>
<div class="image width-25"><img src="<?php the_field('home_about_image'); ?>" alt="about national board of review image"/></div>
<?php endwhile; ?>
</div>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>