-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
72 lines (51 loc) · 2.51 KB
/
single.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
<?php
/**
* The template for displaying all single posts.
*
* @package understrap
*/
get_header();
$container = get_theme_mod( 'understrap_container_type' );
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
if( get_field('page_container','option') ) {
$page_container = get_field('page_container','option') ;
}
?>
<div class="wrapper">
<section class="header-section"></section>
<div id="content" tabindex="-1">
<main class="site-main" id="main">
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title mb-4 text-center brand-bold">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content <?php echo esc_html( $container ); ?>">
<div class="row">
<div class="col-lg-8 offset-lg-2">
<?php the_content(); ?>
<div class="post-gallery d-flex justify-content-center flex-wrap">
<?php $gallery_items_images = get_field( 'gallery_items' ); ?>
<?php if ( $gallery_items_images ) : ?>
<?php foreach ( $gallery_items_images as $gallery_items_image ): ?>
<div class="post-gallery-wrapper">
<a href="<?php echo $gallery_items_image['url']; ?>">
<img src="<?php echo $gallery_items_image['sizes']['thumbnail']; ?>" alt="<?php echo $gallery_items_image['alt']; ?>" />
</a>
<p><?php echo $gallery_items_image['caption']; ?></p>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<script>
jQuery(document).ready(function() {
jQuery('.post-gallery a').simpleLightbox();
});
</script>
</div>
</div>
</div><!-- .entry-content -->
</article><!-- #post-## -->
</main><!-- #main -->
</div><!-- Container end -->
</div><!-- Wrapper end -->
<?php get_footer(); ?>