/
content.php
36 lines (30 loc) · 1.17 KB
/
content.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
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ($cover = deference_get_post_cover()): ?>
<div class="post-cover"<?php echo deference_theme_mod_data_attr('post_cover_height'); ?>>
<img src="<?php echo $cover ?>" alt="" width="100%">
</div>
<?php endif; ?>
<div class="page-section">
<header class="post-header">
<h1 class="post-title"><?php the_title(); ?></h1>
<p class="post-meta">
<?php if (!get_theme_mod('hide_author')): ?>
<?php printf(__('Written by %s', 'deference'), '<a href="'.get_author_posts_url(get_the_author_meta('ID')).'">'.get_the_author_meta('display_name').'</a>'); ?>
·
<?php endif; ?>
<?php the_time(get_option('date_format')) ?>
</p>
</header>
<div class="post-content">
<?php the_content(); ?>
</div>
</div>
<?php get_sidebar(); ?>
<footer class="post-footer page-section">
<?php if (get_the_author_meta('description') && !get_theme_mod('hide_author')): ?>
<?php get_template_part('author-bio'); ?>
<?php endif; ?>
<div class="post-share"></div>
<?php comments_template(); ?>
</footer>
</article>