-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-video.php
67 lines (45 loc) · 1.71 KB
/
content-video.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
<?php
/**
* The template for displaying the video post format on archives.
*
* @package Patch
* @since Patch 1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
//get the media objects from the content and bring up only the first one
$media = patch_video_attachment();
?>
<div class="grid__item">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-meta"><?php patch_card_meta(); ?></div><!-- .entry-meta -->
<?php if ( ! empty( $media ) ) : ?>
<div class="entry-media entry-image entry-image--landscape">
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
<span class="sticky-post"></span>
<?php endif; ?>
<?php echo $media; ?>
</div><!-- .entry-media -->
<?php endif; ?>
<header <?php patch_post_title_class(); ?>>
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
</header><!-- .entry-header -->
<div <?php patch_post_excerpt_class(); ?>>
<?php if ( true === pixelgrade_option( 'blog_items_excerpt_visibility' ) ) {
the_excerpt();
}
wp_link_pages( array(
'before' => '<div class="page-links"><span class="pagination-title">' . esc_html__( 'Pages:', 'patch' ),
'after' => '</span></div>',
'link_before' => '<span>',
'link_after' => '</span>',
'pagelink' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'patch' ) . ' </span>%',
'separator' => '<span class="screen-reader-text">, </span>',
) ); ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php patch_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
</div><!-- .grid__item -->