-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
51 lines (49 loc) · 2.52 KB
/
single.php
File metadata and controls
51 lines (49 loc) · 2.52 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
<?php get_header(); ?>
<div class="blog_entry row center-align">
<div class="<?php echo ( is_active_sidebar( 'sidebar-right' ) && is_blog_entry() )?"col s12 m12 l9":"col s12"; ?>">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="card">
<?php if ( has_post_thumbnail() ) : ?>
<div class="card-image">
<?php the_post_thumbnail( 'full', array( 'class' => 'blog-entry-thumbnail' ) ); ?>
<a class="btn-floating btn-large halfway-fab waves-effect waves-light blog-share-btn" href="#share-modal"><i class="material-icons">share</i></a>
</div> <!-- <div class="card-image"> -->
<?php else: ?>
<a class="btn-floating btn-large halfway-fab waves-effect waves-light blog-share-btn" href="#share-modal"><i class="material-icons">share</i></a>
<?php endif; ?>
<div class="card-content">
<h1><span class=""><?php the_title(); ?></span></h1>
<div class="row">
<div class="col s12 blog-entry-info">
<div class="divider"></div>
<i class="material-icons">account_circle</i>
<?php echo the_author_posts_link(); ?>
<span class="tab-separator">/</span>
<i class="material-icons">perm_contact_calendar</i><?php the_time( get_option( 'date_format' ) ); ?>
<span class="tab-separator">/</span>
<i class="material-icons">folder</i>
<?php $category = get_the_category()[0]; ?>
<a href="<?php echo esc_url( get_category_link( $category->term_id ) ); ?>"><i class="i-right-double-arrow"></i> <?php echo $category->name; ?></a>
<div class="divider"></div>
</div> <!-- <div class="col s12"> -->
</div> <!-- <div class="row"> -->
<?php the_content(); ?>
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo "<div class=\"chip\">";
echo ' <a href="'.get_tag_link($tag->term_id).'">'.$tag->name.'</a>'. ' ';
echo "</div> <!-- <div class=\"chip\"> -->";
}
}
?>
</div> <!-- <div class="card-content"> -->
</div> <!-- <div class="card"> -->
<?php comments_template( '', true ); ?>
<?php endwhile; endif; ?>
</div> <!-- <div class="col s12 m12 l9"> -->
<?php get_sidebar(); ?>
</div> <!-- <div class="blog_entry row center-align"> -->
<?php printShareModal(); ?>
<?php get_footer(); ?>