-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathsingle.php
More file actions
executable file
·53 lines (52 loc) · 1.54 KB
/
single.php
File metadata and controls
executable file
·53 lines (52 loc) · 1.54 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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Bluegreen
*/
get_header(); ?>
<?php while ( have_posts() ) :
the_post();
$hero_style = '';
if ( has_post_thumbnail() ) {
$hero_style = 'style="background-image: url('
. get_the_post_thumbnail_url( get_the_ID(), 'large' )
. ');" ';
}
$categories_list = '<li>' . get_the_category_list( __( '</li><li></li>', 'bluegreen' ), '', get_the_ID() );
$categories = sprintf(
'<ul class="cat-links">' . esc_html__( '%1$s', 'bluegreen' ) . '</ul>',
$categories_list );
?>
<div class="hero is-primary is-fullheight" <?php echo $hero_style; ?>>
<!-- Hero content: will be in the middle -->
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title"><?php the_title(); ?></h1>
<div class="subtitle"><?php echo get_the_date( '', get_the_ID() ); ?></div>
</div>
</div>
<div class="hero-foot">
<nav class="tabs">
<div class="container">
<?php echo $categories; ?>
</div>
</nav>
</div>
</div>
<div id="primary" class="content-area">
<main id="main" class="site-main wrapper" role="main">
<?php get_template_part( 'template-parts/content', 'post' ); ?>
<div class="section">
<div class="container is-narrow">
<?php the_post_navigation(); ?>
</div>
</div>
<?php Bluegreen\Util::the_comments(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php endwhile; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>