-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcontent-summary.php
61 lines (53 loc) · 2.08 KB
/
content-summary.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 template used for displaying page content in The Loop
*
* @package Cover
*/
?>
<?php $img = cover_get_featured_image( get_the_ID() ); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_sticky() && '' != $img ) { ?>
<div class="cover-background darken" style="background-image: url('<?php echo $img; ?>');"></div>
<?php } ?>
<?php if ( ! is_sticky() && '' != $img && 1 == esc_attr( get_theme_mod( 'cover_show_featured_image', 0 ) ) ) { ?>
<div class="entry-featured-image" style="background-image: url('<?php echo $img; ?>');">
<?php if ( function_exists( 'has_post_video' ) && has_post_video() ) { ?>
<span class="svg-icon"><?php get_template_part( 'dist/svg/play', 'circle.svg' ); ?></span>
<?php } ?>
<a href="<?php the_permalink(); ?>"></a>
</div>
<?php } ?>
<header class="entry-header">
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'cover' ) );
if ( $categories_list && cover_categorized_blog() ) :
?>
<h2 class="entry-subtitle"><?php echo $categories_list; ?></h2>
<?php endif; ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<div class="entry-meta">
<?php cover_posted_on(); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-summary">
<?php
if ( has_excerpt() ) {
the_excerpt();
} else if ( strpos( $post->post_content, '<!--more-->' ) ) {
the_content( '' ); // No "more" link.
} else {
the_excerpt();
}
?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'cover' ),
'after' => '</div>',
'link_before' => '<span class="button small">',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-summary -->
</article><!-- #post-## -->