-
Notifications
You must be signed in to change notification settings - Fork 184
/
template-gallery.php
72 lines (42 loc) · 1.23 KB
/
template-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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/*
Template Name: Gallerí
*/
?>
<?php get_header(); ?>
</div>
<div class="col s1of3">
</div>
</div>
<!-- START OF CONTENT -->
<?php
$paged = get_query_var('paged');
query_posts('cat=63,&posts_per_page=30&paged='.$paged);
?>
<div class="grid gutter collapse720">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php if (has_post_thumbnail()): ?>
<div class="col s1of5">
<a href="/wordpress/single-gallery-item/?gallery_post_id=<?php the_id(); ?>" class="gallery-link fancybox">
<?php the_post_thumbnail('sidebar', array(
'alt' => trim(strip_tags( $post->post_title )),
'title' => trim(strip_tags( $post->post_title )),
'class' => 'image',
)); ?>
</a>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
<script type="text/javascript">
$(function(){
$('.sidebar').hide();
$('.gallery-link').fancybox({ type: 'ajax', maxWidth: 670 });
});
</script>
<!-- END OF CONTENT -->
<div class="grid gutter collapse720">
<div class="col s2of3">
<?php get_footer(); ?>