-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery-portrait-paintings.php
84 lines (53 loc) · 1.86 KB
/
gallery-portrait-paintings.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
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* Template Name: Gallery - Painted Portrait Art Page
*
* Template for displaying a page without sidebar even if a sidebar widget is published.
*
* @package understrap
*/
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<!-- <link rel="stylesheet" type="text/css" href="/wp-content/themes/olympos/css/component.css" /> -->
<script src="/wp-content/themes/olympos/js/gallery.js"></script>
<div class="wrapper" id="full-width-page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content">
<div class="row" id="babiesMaternity">
<div class="col-md-12 content-area" id="primary">
<main class="site-main" id="main" role="main">
<!-- gallery start -->
<?php
// get posts
$posts = get_posts(array(
'post_type' => 'children-families',
'posts_per_page' => -1,
'orderby' => 'meta_value',
'order' => 'DESC'
));
if( $posts ): ?>
<div class="m-p-g">
<div class="m-p-g__thumbs" data-google-image-layout data-max-height="350">
<?php foreach( $posts as $post ):
setup_postdata( $post )
?>
<img src="<?php the_field('thumbnail'); ?>" data-full="<?php the_field('image'); ?>" class="m-p-g__thumbs-img" alt="Kathleen Weinstein Photography" />
<?php endforeach; ?>
</div>
<div class="m-p-g__fullscreen"></div>
</div>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
<!-- gallery end -->
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .row end -->
</div><!-- Container end -->
</div><!-- Wrapper end -->
<script>
var elem = document.querySelector('.m-p-g');
document.addEventListener('DOMContentLoaded', function() {
var gallery = new MaterialPhotoGallery(elem);
});
</script>
<?php get_footer(); ?>