-
Notifications
You must be signed in to change notification settings - Fork 1
/
single-testimonials.php
100 lines (84 loc) · 2.94 KB
/
single-testimonials.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
<?php
/*
Template Name: Full Width (No Sidebar)
*/
?>
<?php get_header(); ?>
<div id="content">
<div id="inner-content" class="row">
<main id="main" class="large-12 medium-12 columns" role="main">
<?php get_template_part( 'parts/content', 'breadcrumbs' ); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(''); ?> role="article" itemscope itemtype="http://schema.org/WebPage">
<header class="article-header">
<h1 class="page-title"><?php nest_custom_title(); ?></h1>
</header> <!-- end article header -->
<section class="entry-content" itemprop="articleBody">
<?php
$testimonial = nest_get_testimonial();
?>
<blockquote>
<?php
// Output Image left-aligned
if ( isset( $testimonial[ 'image_id' ] ) ):
$image_src = wp_get_attachment_image_src( $testimonial[ 'image_id' ], 'thumbnail' );
if ( $image_src ):
?>
<p class="alignleft"><img src="<?php echo esc_url( $image_src[ 0 ] ); ?>" alt="<?php the_title(); ?>" /></p>
<?php
endif;
endif;
?>
<?php
// Output the content
$content = $testimonial[ 'excerpt' ];
if ( isset( $testimonial[ 'content' ] ) ) {
$content = $testimonial[ 'content' ];
}
echo apply_filters( 'nest_the_content', $content );
?>
</blockquote>
<?php
// Output organizational information
if ( isset( $testimonial[ 'organization_name' ] ) && ( isset( $testimonial[ 'address' ] ) || isset( $testimonial[ 'phone' ] ) || isset( $testimonial[ 'website' ] ) ) ):
?>
<dl>
<dt>Organization</dt>
<dd><?php echo esc_html( $testimonial[ 'organization_name' ] ); ?>
<?php
if ( isset( $testimonial[ 'address' ] ) ):
?>
<dt>Address</dt>
<dd><?php echo $testimonial[ 'address' ];?></dd>
<?php
endif;
?>
<?php
if ( isset( $testimonial[ 'phone' ] ) ):
?>
<dt>Phone</dt>
<dd><?php echo esc_html( $testimonial[ 'phone' ] );?></dd>
<?php
endif;
?>
<?php
if ( isset( $testimonial[ 'website' ] ) ):
?>
<dt>Website</dt>
<dd><a target="_blank" href="<?php echo esc_url( $testimonial[ 'website' ] );?>"><?php echo esc_html( $testimonial[ 'website' ] );?></a></dd>
<?php
endif;
?>
</dl>
<?php
endif;
?>
</section> <!-- end article section -->
<footer class="article-footer">
</footer> <!-- end article footer -->
</article> <!-- end article -->
<?php endwhile; endif; ?>
</main> <!-- end #main -->
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<?php get_footer(); ?>