This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcontent-post-meta.php
67 lines (54 loc) · 1.84 KB
/
content-post-meta.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* The file is for displaying the blog post meta.
* This has it's own content file because we call it among various post formats.
* If you edit this file, its output will be edited on all post formats.
*
* @package Trim
* @link https://themebeans.com/themes/trim
*/
?>
<ul class="entry-meta subtext">
<li><?php _e( 'Posted by:', 'trim' ); ?> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></li>
<?php if ( is_singular( 'post' ) ) { ?>
<li><?php _e( 'Categories: ', 'trim' ); ?><?php the_category( ', ' ); ?></li>
<?php } ?>
<?php
if ( is_singular( 'download' ) ) {
$terms = get_the_terms( $post->ID, 'download_category' );
if ( $terms && ! is_wp_error( $terms ) ) {
?>
<li><?php _e( 'Categories: ', 'trim' ); ?><?php the_terms( $post->ID, 'download_category', '', ', ', '' ); ?></li>
<?php
}
}
?>
<?php if ( get_theme_mod( 'show_tags', trim_defaults( 'show_tags' ) ) == true && has_tag() ) { ?>
<li class="tags"><?php _e( 'Tags: ', 'trim' ); ?><?php echo the_tags( '', ', ', '' ); ?> </li>
<?php } ?>
<?php if ( comments_open() ) { ?>
<li>
<?php
_e( 'Comments: ', 'trim' );
comments_popup_link( '0', '1', '%' );
?>
</li>
<?php } ?>
<li><?php _e( 'Views: ', 'trim' ); ?><?php echo bean_getPostViews( get_the_ID() ); ?></li>
<?php
if ( is_singular( 'post' ) ) {
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
__( '[Edit<span class="screen-reader-text"> "%s"</span>]', 'trim' ),
get_the_title()
),
'<li class="edit-link">',
'</li>'
);
}
?>
<?php if ( get_theme_mod( 'post_likes', trim_defaults( 'post_likes' ) ) == true or get_theme_mod( 'edd_likes', trim_defaults( 'edd_likes' ) ) == true ) { ?>
<li><?php Bean_PrintLikes( $post->ID ); ?></li>
<?php } ?>
</ul><!-- END .entry-meta -->