Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $args = array(
- 'post_type' => 'attachment',
- 'post_parent' => $post->ID,
- 'post_status' => 'inherit',
- 'post_mime_type' => 'image',
- );?>
- <ul>
- <?php $posts = query_posts( $query_string . 'order=asc' ); ?>
- <?php if (have_posts()): while (have_posts()): the_post(); ?>
- <?php $attachments = new WP_Query( $args );
- $attachments->get_posts();
- $output = '';
- foreach( $attachments->posts as $attachment ) {
- $image_src = wp_get_attachment_image_src( $attachment->ID, 'large');
- $output = '<a href="'. $image_src[0] .'" rel="lightbox[post-1]" class="hidden"></a>';
- }
- ?>
- <?php
- $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
- ?>
- <a href="<?php $image_src[0]; ?>" rel="lightbox[post-1]">
- <?php the_post_thumbnail( 'thumbnail-size'); ?>
- </a>
- <?php endwhile; endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement