-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle.php
93 lines (72 loc) · 3.51 KB
/
single.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
<?php
/**
* The template for displaying all single posts.
*
* @package understrap
*/
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<div class="featured-image-caption">
<?php $key="featured-image-caption"; echo get_post_meta($post->ID, $key, true); ?>
</div>
<div class="wrapper" id="single-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<hr class="header-line">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title"><span class="article-title">', '</span></h1>' ); ?>
<div class="entry-meta">
<?php understrap_posted_on($post->ID); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="row" id="post-content">
<main class="site-main col-lg-8" id="post-main">
<?php while ( have_posts() ) : the_post(); // Load post content?>
<?php get_template_part( 'loop-templates/content', 'article' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
<div class="col-lg-4 sidebar">
<div class="spotify">
<div id= "tagline">
<h5><strong>
<?php $key="spotify-tagline"; echo get_post_meta($post->ID, $key, true); ?>
</strong></h5>
</div>
<?php $key="spotify-embed-code"; echo get_post_meta($post->ID, $key, true); ?>
</div>
<div class="socials">
<a href="https://twitter.com/wrbbradio" target="_blank">
<img src="<?php bloginfo('template_url'); ?>/src/img/twitter.png" alt="Twitter"></a>
<a href="https://www.facebook.com/WRBBRadio/" target="_blank">
<img src="<?php bloginfo('template_url'); ?>/src/img/facebook.png" alt="Facebook"></a>
<a href="https://www.instagram.com/wrbbradio/" target="_blank">
<img src="<?php bloginfo('template_url'); ?>/src/img/instagram.png" alt="Instagram"></a>
</div>
<?php if(get_the_author_meta('description')): ?>
<div class="author-box">
<div class="author-img">
<?php echo get_avatar(get_the_author_meta('user_email'), '30') ?>
</div>
<p class="author">
<a href=<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) ?>>
<?php echo get_the_author_meta('first_name');?>
<?php echo get_the_author_meta('last_name'); ?>
</a>
</p>
<p class="author-description">
<?php esc_textarea(the_author_meta('description')) ?>
</p>
</div>
<?php endif; ?>
</div>
</div><!-- .row -->
<?php get_template_part('src/wrbb-templates/related-articles', "related-articles") ?>
</div><!-- Container end -->
</div><!-- Wrapper end -->
<?php get_footer(); ?>