-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-gallery.php
executable file
·69 lines (46 loc) · 1.74 KB
/
content-gallery.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
<?php
/**
* The template for displaying the gallery post format on archives.
*
* @package Patch Lite
* @since Patch Lite 1.1.6
*/
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
//output the first gallery in the content - if it exists
$gallery = get_post_gallery();
if ( $gallery ) : ?>
<aside class="entry-gallery entry-image entry-image--wide">
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
<span class="sticky-post"></span>
<?php endif; ?>
<?php echo $gallery; ?>
</aside><!-- .entry-gallery -->
<?php endif; ?>
<header <?php patch_lite_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_lite_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-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>',
) ); ?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php patch_lite_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
</div><!-- .grid__item -->