forked from codigoconjuan/escuelacocina_wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-galeria.php
46 lines (35 loc) · 1.83 KB
/
page-galeria.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
<?php
/*
* Template Name: Galería de Imágenes
*/
get_header(); ?>
<?php while(have_posts()): the_post();
get_template_part('template-parts/contenido', 'paginas');
// printf( '<pre>%s</pre>', var_export( get_post_custom( get_the_ID() ), true ) );
$imagenes = get_post_meta(get_the_ID(), 'edc_galeria_imagenes', true);
?>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
<div class="card-columns">
<?php foreach($imagenes as $id => $imagen): ?>
<div class="card">
<a href="#" data-toggle="modal" data-target="#imagen<?php echo $id; ?>">
<?php $imagen = wp_get_attachment_image_url($id, 'full'); ?>
<img src="<?php echo $imagen; ?>" class="img-fluid">
</a>
<div id="imagen<?php echo $id; ?>" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<img src="<?php echo $imagen; ?>" class="img-fluid">
</div>
</div>
</div>
</div><!--,card-->
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>