-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-testimonials.php
61 lines (50 loc) · 1.24 KB
/
template-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
<?php
/**
* The Testimonial Listing template.
*
* TEMPLATE NAME: Testimonial Listing
* @package lightseek
*/
get_header();
do_action('lightseek_template_start');
get_template_part( 'modules/content', 'page-title' );
?>
<div class="row">
<div class="col-md-24">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<?php
$args = array(
'post_type' => 'testimonial',
'posts_per_page' => -1,
);
// The Query
$the_query = new WP_Query( $args );
// The Loop
if ( $the_query->have_posts() ) { ?>
<?php
while ( $the_query->have_posts() ) {
$the_query->the_post();
?>
<div class="testimonial-listing">
<blockquote>
<?php $content = get_the_content();
$content = '<span>“</span>'.$content.'<span>”</span>';
echo apply_filters('the_content', $content);
?>
<p class="source">- <?php the_title(); ?></p>
</blockquote>
</div>
<?php }
/* Restore original Post Data */
wp_reset_postdata();
}
?>
</article>
</div>
</div>
<?php
do_action('lightseek_template_end');
get_footer();