/
single-galeria-zdjec.php
70 lines (46 loc) · 1.41 KB
/
single-galeria-zdjec.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
<?php get_header(); ?>
<!--<?php get_sidebar(); ?>-->
<div class="col-md-12 omega">
<?php
wp_reset_query();
wp_reset_postdata();
if (have_posts()) : the_post();?>
<div class="breadcrumbs_new">
<?php
breadcrumbs('', true);
$cat = get_field("kategoria_galerii");
$catUrl = "?post_type=galeria-zdjec&gal=$cat";
$title = get_the_title();
echo "<a href='$catUrl' class='breadcrumbs'> $cat</a>";
print '<span class="breadcrumbs sep"> > </span>';
echo "<a class='breadcrumbsBold'>". dm_more($title, 60, '') ."</a>";
?>
</div>
<div class="text">
<?php echo short_opis(); ?>
</div>
<ul class="dm_gallery">
<?php
$counter = 0;
$id = get_the_ID();
$rel = ' rel="lightbox['.$id.']" ';
while(the_repeater_field('zdjecia')){
$counter++;
$thumb = get_sub_field('zdjecie_galerii');
$link = $thumb;
$thumb = site_url().'/resize/138x140x1/r/'. dm_relative($thumb);
$opis = get_sub_field('opis-zdjecia');
?>
<li><a class="gallery-item" href="<?= $link; ?>" <?= $rel; echo ' title="'.$opis.'"';?> >
<img src="<?= $thumb; ?>" alt="<?= $opis; ?>" />
</a></li>
<?php }?>
</ul>
<div style="display: block; height: 48px;"></div>
<?php else : ?>
<h2>---</h2>
<?php endif;
wp_reset_query();
?>
</div>
<?php get_footer(); ?>