-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcontent-single.php
More file actions
executable file
·79 lines (64 loc) · 2.5 KB
/
content-single.php
File metadata and controls
executable file
·79 lines (64 loc) · 2.5 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
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
<?php
// Get the data set in customizer
$cat = get_theme_mod( 'bulan-post-cat', 1 );
$date = get_theme_mod( 'bulan-post-date', 1 );
$tag = get_theme_mod( 'bulan-post-tag', 1 );
$date_style = get_theme_mod( 'bulan-post-date-style', 'absolute' );
// Set up empty variable
$style = '';
if ( $date_style == 'absolute' ) {
$style = esc_html( get_the_date() );
} else {
$style = sprintf( __( '%s ago', 'bulan' ), human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) );
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php hybrid_attr( 'post' ); ?>>
<header class="entry-header">
<?php if ( 'post' == get_post_type() ) : ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'bulan' ) );
if ( $categories_list && bulan_categorized_blog() && $cat ) :
?>
<span class="cat-links" <?php hybrid_attr( 'entry-terms', 'category' ); ?>>
<?php echo $categories_list; ?>
</span>
<i class="fa fa-circle"></i>
<?php endif; // End if categories ?>
<?php endif; ?>
<?php if ( $date ) : ?>
<time class="published" datetime="<?php echo esc_html( get_the_date( 'c' ) ); ?>" <?php hybrid_attr( 'entry-published' ); ?>><?php echo esc_html( $style ); ?></time>
<?php endif; ?>
<?php the_title( '<h1 class="entry-title" ' . hybrid_get_attr( 'entry-title' ) . '>', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php if ( has_excerpt() ) : ?>
<div class="page-header">
<?php the_excerpt(); ?>
</div><!-- .page-header -->
<?php endif; ?>
<div class="entry-content" <?php hybrid_attr( 'entry-content' ); ?>>
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'bulan' ),
'after' => '</div>',
) );
?>
</div>
<footer class="entry-footer">
<?php
$tags = get_the_tags();
if ( $tags && $tag ) :
?>
<span class="tag-links" <?php hybrid_attr( 'entry-terms', 'post_tag' ); ?>>
<?php foreach( $tags as $tag ) : ?>
<a href="<?php echo esc_url( get_tag_link( $tag->term_id ) ); ?>"><span>#</span><?php echo esc_attr( $tag->name ); ?></a>
<?php endforeach; ?>
</span>
<?php endif; ?>
</footer>
<div class="jetpack-share-like">
<?php if ( function_exists( 'sharing_display' ) ) { sharing_display( '', true ); } ?>
<?php if ( class_exists( 'Jetpack_Likes' ) ) { $custom_likes = new Jetpack_Likes; echo $custom_likes->post_likes( '' ); } ?>
</div>
</article><!-- #post-## -->