This repository was archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-meta.php
More file actions
77 lines (56 loc) · 1.97 KB
/
content-meta.php
File metadata and controls
77 lines (56 loc) · 1.97 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
<?php
/**
* The template part for displaying the post meta information
*
* @package Designer
*/
// Get the post tags
$post_tags = get_the_tags();
// Get the Jetpack portfolio tags
$portfolio_tags = get_the_term_list( get_the_ID(), 'jetpack-portfolio-tag', '', _x(', ', '', 'designer' ), '' );
// Get the portfolio categories
$portfolio_cats = get_the_term_list( get_the_ID(), 'jetpack-portfolio-type', '', _x(', ', '', 'designer' ), '' );
?>
<div class="entry-meta">
<ul class="meta-list">
<!-- Published date -->
<li>
<strong><?php _e( 'Published', 'designer' ); ?></strong>
<?php echo get_the_date(); ?>
</li>
<!-- Author posts link -->
<li>
<strong><?php _e( 'Author', 'designer' ); ?></strong>
<?php the_author_posts_link(); ?>
</li>
<!-- Categories for posts and portfolio items -->
<?php if ( has_category() || $portfolio_cats ) { ?>
<li class="meta-cat">
<strong><?php _e( 'Category', 'designer' ); ?></strong>
<?php if ( 'jetpack-portfolio' == get_post_type() ) {
echo $portfolio_cats;
} else {
the_category( ', ' );
} ?>
</li>
<?php } ?>
<!-- Tags for posts and portfolio items -->
<?php if ( is_single() && $post_tags || 'jetpack-portfolio' == get_post_type() && $portfolio_tags ) { ?>
<li class="meta-tag">
<strong><?php _e( 'Tags', 'designer' ); ?></strong>
<?php if ( 'jetpack-portfolio' == get_post_type() ) {
echo $portfolio_tags;
} else {
the_tags( '' );
} ?>
</li>
<?php } ?>
<!-- Comments -->
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<li class="meta-comment">
<strong><?php _e( 'Comments', 'designer' ); ?></strong>
<span class="comments-link"><?php comments_popup_link( __( 'Leave Comment', 'designer' ), __( '1 Comment', 'designer' ), __( '% Comments', 'designer' ) ); ?></span>
</li>
<?php endif; ?>
</ul><!-- .meta-list -->
</div><!-- .entry-meta -->