-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-customer_stories.php
97 lines (76 loc) · 2.67 KB
/
single-customer_stories.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
<?php
/**
* Single Post
*
* @package gsc
*/
get_header();
?>
</header>
<div class="primary content-area">
<main id="main" class="site-main" role="main">
<div class="section regular-spacing">
<div class="container section padding-bottom-border">
<div class="row">
<?php while(have_posts()): the_post(); ?>
<div class="col-4">
<h2><?php the_title(); ?></h2>
<div class="featured"><?php the_post_thumbnail('medium'); ?></div>
<div class="excerpt">
<?php the_excerpt(); ?>
</div>
</div>
<div class="col-8">
<?php the_content(); ?>
<?php get_template_part('template-parts/content' , 'share'); ?>
</div>
</div>
<?php endwhile; wp_reset_postdata(); ?>
</div>
<div class="section half-padding">
<div class="container">
<div class="col-12">
<h3><?php echo __('Related Posts' , 'gsc'); ?></h3>
</div>
<div class="row">
<?php
$related = new WP_Query( array( 'post_type' => 'customer_stories', 'posts_per_page' => 3 , 'orderby' => 'rand') );
while ( $related->have_posts() ) : $related->the_post(); ?>
<div class="col-md-4">
<div class="related-item">
<?php
$default_url = get_template_directory_uri().'/img/blog-default.png';
$src = !get_the_post_thumbnail_url(get_the_ID() , 'thumbnail')?$default_url:get_the_post_thumbnail_url(get_the_ID() , 'thumbnail');
?>
<div><img src="<?php echo $src ?>" alt=""></div>
<h2><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
<a href="<?php the_permalink(); ?>" class="read-more">Read More</a>
</div>
</div>
<?php endwhile; wp_reset_postdata(); ?>
</div>
</div>
</div>
</div>
<div id="ressource-nav" class="section background-dark regular-padding">
<div class="container">
<div class="row">
<div class="col-6 text-center border-right">
<div class="text-nav"><?php echo __('Back to customer stories' , 'gsc'); ?></div>
<div class="my-3">
<a href="#" class="button default"><?php echo __('Resources' , 'gsc'); ?></a>
</div>
</div>
<div class="col-6 text-center">
<div class="text-nav"><?php echo __('Back to a Blog' , 'gsc'); ?></div>
<div class="my-3">
<a href="#" class="button default"><?php echo __('Resources' , 'gsc'); ?></a>
</div>
</div>
</div>
</div>
</div>
</main>
</div><!-- .primary -->
<?php get_footer(); ?>