-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patholdgallery.php
More file actions
27 lines (22 loc) · 936 Bytes
/
oldgallery.php
File metadata and controls
27 lines (22 loc) · 936 Bytes
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
<div class="fullGallery">
<div class="buttonCoverRight"></div>
<div class="galleryButtonRight" onclick="moveForward()"></div>
<div class="buttonCoverLeft"></div>
<div class="galleryButtonLeft" onclick="moveBackByImage()"></div>
<div class="galleryImageHolder">
<?php
$counter = 1;
$my_secondary_loop = new WP_Query(array( 'post_type' => 'post', 'posts_per_page' => -1, 'cat' => 14 ));
if( $my_secondary_loop->have_posts() ):
while( $my_secondary_loop->have_posts() ): $my_secondary_loop->the_post();
$imageURL = '';
if ( has_post_thumbnail() ) {
$imageURL = wp_get_attachment_url( get_post_thumbnail_id() ); ?>
<div class="image <?php echo $counter; ?>" style="background-image:url('<?php echo $imageURL ?>');"></div>
<?php }
$counter++;
endwhile;
endif;
wp_reset_postdata(); ?>
<div class="clear"></div>
</div>