-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathpage.php
108 lines (100 loc) · 4.28 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
99
100
101
102
103
104
105
106
107
108
<?php get_header(); ?>
<body <?php body_class(); ?>>
<?php get_template_part( "/template-parts/common/hero" ); ?>
<div class="container">
<?php if ( is_front_page() ) { ?>
<div class="row">
<div class="col-md-8 offset-md-2">
<?php
$attachments = new Attachments( 'testimonials',14 );
if ( class_exists( "Attachments" ) && $attachments->exist() ) {
?>
<h2 class="text-center">
<?php _e( "Testimonials", "alpha" ); ?>
</h2>
<?php
}
?>
<div class="testimonials slider text-center">
<?php
if ( class_exists( "Attachments" ) ) {
if ( $attachments->exist() ) {
while ( $attachment = $attachments->get() ) { ?>
<div>
<?php echo $attachments->image( 'thumbnail' ); ?>
<h4><?php echo esc_html( $attachments->field( 'name' ) ); ?></h4>
<p><?php echo esc_html( $attachments->field( 'testimonial' ) ); ?></p>
<p>
<?php echo esc_html( $attachments->field( 'position' ) ); ?>,
<strong>
<?php echo esc_html( $attachments->field( 'company' ) ); ?>
</strong>
</p>
</div>
<?php
}
}
}
?>
</div>
</div>
</div>
<?php } ?>
</div>
<div class="posts">
<?php
while ( have_posts() ) :
the_post();
?>
<div class="post" <?php post_class(); ?>>
<div class="container">
<div class="row">
<div class="col-md-10 offset-md-1">
<h2 class="post-title text-center">
<?php the_title(); ?>
</h2>
<p class="text-center">
<em><?php the_author(); ?></em><br/>
<?php echo get_the_date(); ?>
</p>
</div>
</div>
<div class="row">
<div class="col-md-10 offset-md-1">
<p>
<?php
if ( has_post_thumbnail() ) {
$thumbnail_url = get_the_post_thumbnail_url( null, "large" );
printf( '<a class="popup" href="%s" data-featherlight="image">', $thumbnail_url );
the_post_thumbnail( "large", array( "class" => "img-fluid" ) );
echo '</a>';
}
the_content();
/*next_post_link();
echo "<br/>";
previous_post_link();*/
?>
</p>
</div>
</div>
</div>
</div>
<?php
endwhile;
?>
<div class="container post-pagination">
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-8">
<?php
the_posts_pagination( array(
"screen_reader_text" => ' ',
"prev_text" => "New Posts",
"next_text" => "Old Posts"
) );
?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>