-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-jetpack-testimonial.php
63 lines (48 loc) · 1.96 KB
/
archive-jetpack-testimonial.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
<?php
/**
* The archive template for Jetpack testimonial posts.
*
* @package Daniela
*/
get_header(); ?>
<?php $jetpack_options = get_theme_mod( 'jetpack_testimonials' ); ?>
<?php if ( isset( $jetpack_options['featured-image'] ) && '' != $jetpack_options['featured-image'] ) : ?>
<p class="archive-thumbnail">
<?php echo wp_get_attachment_image( (int)$jetpack_options['featured-image'], 'daniela-full-width' ); ?>
</p><!-- .archive-thumbnail -->
<?php endif; ?>
<header class="archive-header">
<h1 class="archive-title">
<?php
if ( isset( $jetpack_options['page-title'] ) && '' != $jetpack_options['page-title'] )
echo esc_html( $jetpack_options['page-title'] );
else
esc_html_e( 'Testimonials', 'daniela' );
?>
</h1>
<?php if ( isset( $jetpack_options['page-content'] ) && '' != $jetpack_options['page-content'] ) : ?>
<div class="archive-description">
<?php echo convert_chars( convert_smilies( wptexturize( stripslashes( wp_filter_post_kses( addslashes( $jetpack_options['page-content'] ) ) ) ) ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
</header><!-- .page-header -->
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<div class="testimonials">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'testimonial' ); ?>
<?php endwhile; ?>
<?php the_posts_navigation( array(
'prev_text' => esc_html__( 'Older testimonials', 'daniela' ),
'next_text' => esc_html__( 'Newer testimonials', 'daniela' ),
'screen_reader_text' => esc_html__( 'Testimonials navigation', 'daniela' ),
) ); ?>
</div><!-- .projects -->
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>