-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcontent.php
48 lines (44 loc) · 1.75 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
37
38
39
40
41
42
43
44
45
46
47
48
<article <?php post_class(); ?>>
<header class="post_header">
<div class="post_meta"><div class="sticker">
<section class="post_meta_time">
<h4><?=__('Date Time','slackview')?></h4>
<?php the_time('y/m/j H:i'); ?>
</section>
<section class="post_meta_author">
<h4><?=__('Author','slackview')?></h4>
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"><?php the_author(); ?></a>
</section>
<section class="post_meta_cat">
<h4><?=__('Category','slackview')?></h4>
<?php the_category(' ') ?>
</section>
<section class="post_meta_tags">
<h4><?=__('Tags','slackview')?></h4>
<?php the_tags('',', ',''); ?>
</section>
<section class="post_meta_reply">
<a href="<?php comments_link(); ?>" ><?php comments_number( __('Leave a Reply','slackview') , __('Single Comment','slackview') , __('% Comments','slackview') ); ?></a>
</section>
<section class="post_meta_edit">
<?php edit_post_link( __( 'Edit Post', 'slackview' ) ); ?>
</section>
</div></div>
<?php $post_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'large' );
if ( $post_img != null ) { ?>
<div class="post_img" style="background-image: url('<?=$post_img[0] ?>')"></div>
<?php }; ?>
<?php if ( is_single() ) :
the_title( '<h1 class="post_title">', '</h1>' );
else :
the_title( sprintf( '<h2 class="post_title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
endif; ?>
</header>
<div class="post_content">
<?php the_content('READ MORE →'); ?>
</div>
<?php the_post_navigation( array(
'next_text' => '<span class="post_nav_title">%title</span>',
'prev_text' => '<span class="post_nav_title">%title</span>',
) ); ?>
</article>