-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-offices.php
143 lines (118 loc) · 6.74 KB
/
single-offices.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
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
<?php
/**
* The template for displaying all single posts and attachments
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/
get_header(); ?>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDrTxR-KtWbAX4BmI6ph7mrjHRmURS0Yu8"></script>
<?php
//if 'show hero' image has been selected
if (get_field('uthsc_show_post_hero_image', $post_id)) {
//if a hero image has been uploaded
$hero_img = get_field('uthsc_post_hero_image');
if (!empty($hero_img)) {
//load the post hero image
get_template_part('template-parts/uthsc-post-hero');
} else {
//otherwise load the featured image
get_template_part('template-parts/featured-image');
}
}
?>
<div id="single-post" role="main" class="row">
<?php do_action('foundationpress_before_content'); ?>
<?php while (have_posts()) :
the_post(); ?>
<div class="columns">
<article <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<header>
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php do_action('foundationpress_post_before_entry_content'); ?>
<div class="entry-content">
<div class="row">
<div class="columns medium-6 large-8">
<!--============================================-->
<?php
$care_image = uthsc_get_acf('care_image_url', get_the_ID(), '', '');
if (!empty($care_image)): ?>
<figure class="uthsc-figure thumbnail">
<img src="<?php echo uthsc_get_acf('care_image_url', get_the_ID(), '', ''); ?>"
alt="<?php echo uthsc_get_acf('care_image_alt', get_the_ID(), '', ''); ?>"
width="100%"
height="">
<figcaption><?php echo uthsc_get_acf('care_image_caption', get_the_ID(), '', ''); ?></figcaption>
</figure>
<?php endif; ?>
<!--============================================-->
<?php
$image = get_field('care_upload_image');
if (!empty($image)): ?>
<figure class="uthsc-figure thumbnail">
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>"/>
<figcaption><?php echo uthsc_get_acf('care_image_caption', get_the_ID(), '', ''); ?></figcaption>
</figure>
<?php endif; ?>
<!--============================================-->
<?php
$care_iframe = uthsc_get_acf('care_iframe', get_the_ID(), '', '');
if (!empty($care_iframe)): ?>
<figure class="uthsc-figure thumbnail care-streetview-iframe">
<?php echo uthsc_get_acf('care_iframe', get_the_ID(), '', ''); ?>
<figcaption><?php echo uthsc_get_acf('care_image_caption', get_the_ID(), '', ''); ?></figcaption>
</figure>
<?php endif; ?>
<!--============================================-->
<?php echo uthsc_get_acf('care_description', get_the_ID(), '', ''); ?>
<!-- --><?php //the_content(); ?>
</div>
<div class="columns medium-6 large-4 callout">
<?php
$location = get_field('care_map');
if (!empty($location)):
?>
<div class="acf-map">
<div class="marker" data-lat="<?php echo $location['lat']; ?>"
data-lng="<?php echo $location['lng']; ?>"></div>
</div>
<?php endif; ?>
<dl class="care-office-list">
<dt><span class="fa fa-link fa-fw"></span> <a
href="<?php echo uthsc_get_acf('care_webpage_link', get_the_ID(), '', ''); ?>"><?php echo uthsc_get_acf('care_webpage_link_text', get_the_ID(), '', ''); ?></a>
</dt>
<dt>
<span class="fa fa-phone fa-fw"></span> <?php echo uthsc_get_acf('care_phone', get_the_ID(), '', ''); ?>
</dt>
<dt><span class="fa fa-envelope fa-fw"></span> <a
href="mailto:<?php echo uthsc_get_acf('care_email', get_the_ID(), '', ''); ?>"><?php echo uthsc_get_acf('care_email', get_the_ID(), '', ''); ?></a>
</dt>
<dt>
<span class="fa fa-clock-o fa-fw"></span> <?php echo uthsc_get_acf('care_hours', get_the_ID(), '', ''); ?>
</dt>
<dt><span class="fa fa-map-marker fa-fw"
style="height: 2.5rem;float: left;margin-top: 0.2rem;"></span> <?php echo uthsc_get_acf('care_address', get_the_ID(), '', ''); ?>
</dt>
</dl>
<a class="button large fa fa-comment expanded"> Contact this office</a>
</div>
</div>
</div>
<!-- --><?php //echo do_shortcode('[offices]'); ?>
<?php edit_post_link(__('Edit', 'foundationpress'), '<span class="edit-link">', '</span>'); ?>
</div>
<footer>
<?php wp_link_pages(array('before' => '<nav id="page-nav"><p>' . __('Pages:', 'foundationpress'), 'after' => '</p></nav>')); ?>
<p><?php the_tags(); ?></p>
</footer>
<!-- --><?php //the_post_navigation(); ?>
<?php do_action('foundationpress_post_before_comments'); ?>
<?php comments_template(); ?>
<?php do_action('foundationpress_post_after_comments'); ?>
</article>
</div>
<?php endwhile; ?>
<?php do_action('foundationpress_after_content'); ?>
</div>
<?php get_footer();