-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
115 lines (91 loc) · 3.85 KB
/
single.php
File metadata and controls
115 lines (91 loc) · 3.85 KB
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
109
110
111
112
113
114
115
<?php
get_header();
$image = get_the_post_thumbnail_url();
?>
<div class="featured" style="background-image: url('<?php _e($image);?>')">
<div class="featured-overlay"></div>
</div>
<div class="container overlay-div">
<div class="row">
<div class="col-sm-12">
<?php if(have_posts()): while ( have_posts() ) : the_post(); ?>
<div class="post-date">
<?php _e(get_the_date( 'F j, y' ));?> | <?php echo do_shortcode('[rt_reading_time postfix="min" postfix_singular="min read"]'); ?>
</div>
<h1 class="post-title"><?php the_title();?></h1>
<div class="post-excerpt"><?php the_excerpt(); ?></div>
<div class="flash-message"></div>
<div class="post-author-link">
<div>
<span style="font-size:1.125em">By</span>
<span class="post-author"> <?php
if ( function_exists( 'coauthors_posts_links' ) ) {
coauthors_posts_links();
} else {
the_author_posts_link();
} ?>
</span>
</div>
<?php
$summary = get_post_meta( get_the_ID(), 'btp_post_summary', true );
?>
<div class="summary-wrapper">
<?php if($summary && strlen($summary) > 1 ) : ?>
<a data-toggle="collapse" class="summary-link" href="#collapseSummary">
Summary <ion-icon name="caret-down-outline"></ion-icon>
</a>
<?php endif; ?>
<div class="d-block d-md-none">
<?php btp_get_social_share_links(false);?>
</div>
</div>
</div>
<div class="collapse" id="collapseSummary">
<?php _e($summary); ?>
</div>
<div class="social-share-aside clearfix">
<?php btp_get_social_share_links();?>
</div>
<div class="page-title-separator"></div>
<div class="progress-container">
<div class="progress-indicator"></div>
</div>
<div class="post-content"><?php the_content(); ?></div>
<div class="post-tags"> <?php
$tags = get_the_tags();
if($tags) : ?>
<ul class="post-tag-pills"> <?php
foreach($tags as $tag) {
$tag_link = get_term_link( $tag );
if ( is_wp_error( $tag_link ) ) {
continue;
}
echo '<li><a href="' . esc_url( $tag_link ) . '">#' . $tag->name . '</a></li>';
} ?>
</ul> <?php
endif; ?>
</div>
<div class="page-title-separator"></div>
<?php
if ( function_exists('coauthors_posts_links') ) {
get_template_part('template-parts/post/coauthors-box');
}
// get_template_part('template-parts/post/author-box')?>
<?php endwhile; endif; ?>
</div>
</div>
</div>
<div class="container similar-content">
<div class="row">
<div class="col-md-12">
<h2 class="title text-center">Articles you might be interested in</h2>
<?php
$categories = wp_get_post_categories($post->ID, ['ids']);
$cats_str = implode(',', $categories);
$output = do_shortcode('[orbit_query post_type="post" cat="'. $cats_str .'" style="card" posts_per_page="3" post__not_in="'. $post->ID .'"]');
echo $output;
?>
</div>
</div>
</div>
<?php get_footer(); ?>