-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage.php
98 lines (93 loc) · 3.55 KB
/
page.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
<?php get_header(); ?>
<?php if(have_posts()) : the_post(); ?>
<?php // if(is_page('about')) jeo_map(); ?>
<article id="content" class="single-post">
<header id="page-header" class="page-header">
<div class="container">
<div class="twelve columns">
<h1><?php the_title(); ?></h1>
</div>
</div>
</header>
<section class="content">
<div class="container">
<div class="row">
<div class="twelve columns">
<?php if($post->post_excerpt) : ?>
<section id="post-excerpt">
<?php the_excerpt(); ?>
</section>
<?php endif; ?>
<?php the_content(); ?>
</div>
</div>
<?php
$hide_partners = true;
if(is_page('about') && !$hide_partners) :
$partners = get_posts(array('post_type' => 'partner', 'posts_per_page' => -1));
if($partners) :
global $post;
?>
<div id="lq-partners" class="row">
<div class="twelve columns">
<h3><?php _e('Partners', 'landquest'); ?></h3>
</div>
<?php foreach($partners as $partner) :
$post = $partner;
setup_postdata($post);
?>
<div class="three columns">
<article id="partner-<?php the_ID(); ?>">
<a href="<?php the_permalink(); ?>" target="_blank" rel="external"><?php the_post_thumbnail('small-thumbnail', array('class' => 'scale-with-grid', 'alt' => get_the_title())); ?></a>
<h4><a href="<?php the_permalink(); ?>" target="_blank" rel="external"><?php the_title(); ?></a></h4>
<p class="website"><a href="<?php the_permalink(); ?>" target="_blank" rel="external"><?php the_field('partner_url'); ?></a></p>
</article>
</div>
<?php
wp_reset_postdata();
endforeach;
?>
</div>
<?php
endif;
endif;
?>
<?php
$hide_authors = false;
if(is_page('about') && !$hide_authors) :
$authors = get_posts(array('post_type' => 'author', 'posts_per_page' => -1));
if($authors) :
global $post;
?>
<div id="lq-authors" class="row">
<div class="twelve columns">
<h3><?php _e('Authors', 'landquest'); ?></h3>
<?php foreach($authors as $author) :
$post = $author;
setup_postdata($post);
?>
<div class="row">
<article id="author-<?php the_ID(); ?>" class="author-item">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('small-thumbnail', array('alt' => get_the_title())); ?></a>
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php if(get_field('author_url')) : ?>
<p class="website"><a href="<?php the_field('author_url'); ?>" target="_blank" rel="external"><?php the_field('author_url'); ?></a></p>
<?php endif; ?>
<?php the_content(); ?>
</article>
</div>
<?php
wp_reset_postdata();
endforeach;
?>
</div>
</div>
<?php
endif;
endif;
?>
</div>
</section>
</article>
<?php endif; ?>
<?php get_footer(); ?>