-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
executable file
·101 lines (87 loc) · 3.78 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* @package Illustratr
*/
$format = get_post_format();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( '' != get_the_post_thumbnail() && '' == $format ) : ?>
<div class="entry-thumbnail">
<?php if ( ! is_single() ) : ?>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'illustratr-featured-image' ); ?>
</a>
<?php else : ?>
<?php the_post_thumbnail( 'illustratr-featured-image' ); ?>
<?php endif; ?>
</div><!-- .entry-thumbnail -->
<?php endif; ?>
<header class="entry-header">
<?php
if ( is_single() ) {
the_title( '<h1 class="entry-title">', '</h1>' );
} else {
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
}
?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'illustratr' ) );
if ( 'post' == get_post_type() && $categories_list && illustratr_categorized_blog() ) :
?>
<span class="cat-links"><?php echo $categories_list; ?></span>
<?php endif; ?>
<?php
if ( 'jetpack-portfolio' == get_post_type() ) {
echo get_the_term_list( $post->ID, 'jetpack-portfolio-type', '<span class="portfolio-entry-meta">', _x(', ', 'Used between list items, there is a space after the comma.', 'illustratr' ), '</span>' );
}
?>
</header><!-- .entry-header -->
<?php if ( 'jetpack-portfolio' != get_post_type() ) : // Don't display Content for Portfolio ?>
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'illustratr' ) ); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links clear">',
'after' => '</div>',
'pagelink' => '<span class="page-link">%</span>',
) );
?>
</div><!-- .entry-content -->
<?php endif; ?>
<?php endif; ?>
<!-- Newsletter invitation -->
<?php
if ( is_single() ) {
get_template_part( 'newsletterAd' );
}
?>
<?php
$comments_status = false;
if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) {
$comments_status = true;
}
?>
<?php if ( 'jetpack-portfolio' != get_post_type() ) : // Don't display entry-meta for Portfolio ?>
<footer class="entry-meta">
<?php if ( 'post' == get_post_type() ) : // Hide post meta for pages on Search ?>
<?php illustratr_posted_on(); ?>
<?php if( has_post_format() ) : ?>
<span class="entry-format"><a href="<?php echo esc_url( get_post_format_link( $format ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'illustratr' ), get_post_format_string( $format ) ) ); ?>"><?php echo get_post_format_string( $format ); ?></a></span>
<?php endif; ?>
<?php
/* translators: used between list items, there is a space after the comma */
the_tags( sprintf( '<span class="tags-links">%s ', esc_html__( 'Tagged', 'illustratr' ) ), esc_html__( ', ', 'illustratr' ), '</span>' ); ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'illustratr' ), __( '1 Comment', 'illustratr' ), __( '% Comments', 'illustratr' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'illustratr' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
<?php endif; ?>
</article><!-- #post-## -->