forked from City-of-Helsinki/wordpress-helfi-spouse-program
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-rl_gallery.php
54 lines (49 loc) · 1.51 KB
/
archive-rl_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
<?php
get_header();
?>
<main id="main-content" role="main">
<div class="container">
<div class="row">
<div class="col-12 archive pt-4">
<h1 class="text-center"><?php post_type_archive_title() ?></h1>
</div>
<div class="col-12 events-column">
<?php
if (have_posts()) :
while (have_posts()) :
the_post();
?>
<div class="col-lg-4 col-12 col-sm-12 d-flex">
<a href="<?php echo get_permalink($post) ?>">
<div class="event">
<div class="event-content-wrap">
<div class="event-content">
<?php
$rl = new Responsive_Lightbox_Galleries(true);
$images = $rl->get_gallery_images( get_the_ID(), array( 'exclude' => true ) );
if ($images):
$thumbId = $images[0]["id"];
?>
<div class="event-img" style="background-image: url(<?php echo wp_get_attachment_image_url($thumbId, 'medium') ?>"></div>
<?php
endif;
?>
<div class="card-body">
<div class="event-schedule">
<p class="post-title"><?php the_title() ?></p>
</div>
</div>
</div>
</div>
</div></a>
</div>
<?php
endwhile;
endif;
?>
</div>
</div>
</div>
</main>
<?php
get_footer();