-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
61 lines (54 loc) · 1.86 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
<?php
/**
* The default template for displaying content. Used for both single and index/archive/search.
*
* @package Forest
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php stag_post_start(); ?>
<header class="entry-header">
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<figure class="entry-thumbnail">
<?php
if ( ! is_single() ) {
echo '<a href="' . get_permalink( get_the_ID() ) . '">';}
?>
<?php the_post_thumbnail(); ?>
<?php
if ( ! is_single() ) {
echo '</a>';}
?>
</figure>
<?php endif; ?>
<div class="entry-metadata">
<time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time><?php esc_html_e( ' in category ', 'forest' ) ?><span class="category"><?php echo get_the_category_list( __( ', ', 'forest' ) ); ?></span>
<?php if ( has_tag() ) : ?>
<span class="post-tags">
<?php the_tags( 'tags ', ', ', '' ); ?>
</span>
<?php endif; ?>
and <?php comments_popup_link( '0 comments', '1 comment', '% comments' ); ?>.
</div>
<?php if ( is_single() ) : ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php else : ?>
<h1 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'forest' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
</h1>
<?php endif; // is_single() ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content( __( 'Read More…', 'forest' ) );
wp_link_pages(
array(
'before' => '<p><strong>' . __( 'Pages:', 'forest' ) . '</strong> ',
'after' => '</p>',
'next_or_number' => 'number',
)
);
?>
</div><!-- .entry-content -->
<?php stag_post_end(); ?>
</article><!-- #post -->