Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="camera_wrap">
- <?php
- $argslide = array('post_type' => 'slide');
- $loop = new WP_Query($argslide);
- if ( $loop->have_posts() ) while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <?php
- $args = array( 'order' => 'ASC',
- 'orderby' => 'menu_order',
- 'post_type' => 'attachment',
- 'post_parent' => $post->ID,
- 'post_mime_type' => 'image',
- 'post_status' => null,
- 'numberposts' => -1,
- //'exclude' => $thumb_id
- );
- $attachments = get_posts($args);
- foreach ($attachments as $attachment){
- $image_big = wp_get_attachment_image_src( $attachment->ID, 'big' );
- $image_small = wp_get_attachment_image_src( $attachment->ID, 'thumbnail' ); ?>
- <div data-thumb="<?php echo $image_small[0] ?>" data-src="<?php echo $image_big[0] ?>"></div>
- <?php } ?>
- <?php endwhile; ?>
- </div>
- <script type="text/javascript" charset="utf-8">
- jQuery('.camera_wrap').camera({
- thumbnails: true
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement