-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent.php
73 lines (49 loc) · 1.98 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
<?php
/**
* The default template for displaying individual posts on archives
*
* @package Patch Lite
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<div class="grid__item">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-meta"><?php patch_lite_card_meta(); ?></div><!-- .entry-meta -->
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php the_permalink(); ?>" <?php patch_lite_post_thumbnail_class( 'entry-image' ); ?>>
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
<span class="sticky-post"></span>
<?php endif; ?>
<span class="hover" role="presentation"><?php esc_html_e( 'Read More', 'patch-lite' ); ?></span>
<div class="entry-image-wrapper">
<?php the_post_thumbnail( 'patch-masonry-image' ); ?>
</div>
</a>
<?php endif; ?>
<?php
//just in case there is no title, no need for the <header>
$temp_title = get_the_title();
if ( ! empty( $temp_title ) ) : ?>
<header <?php patch_lite_post_title_class(); ?>>
<?php if ( is_sticky() && ! has_post_thumbnail() && is_home() && ! is_paged() ) : ?>
<span class="sticky-post"></span>
<?php endif; ?>
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
</header><!-- .entry-header -->
<?php endif; ?>
<div <?php patch_lite_post_excerpt_class(); ?>>
<?php patch_lite_post_excerpt();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="pagination-title">' . esc_html__( 'Pages:', 'patch-lite' ),
'after' => '</span></div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'patch-lite' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) ); ?>
<?php patch_lite_entry_footer(); ?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
</div><!-- .grid__item -->