Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php query_posts( array( 'category__and' => array(1), 'posts_per_page' => 3, 'orderby' => 'title', 'order' => 'DESC' ) );
- while ( have_posts() ) : the_post(); ?>
- <?php
- $args = array( 'post_type' => 'attachment', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID );
- $images = get_posts($args);
- if ($images) {
- foreach ( $images as $image ) { ?>
- <a href="<?php echo wp_get_attachment_url( $image->ID , 'thumbnail' ); ?>" rel="lightbox"><div class="home-thumbs"><?php echo wp_get_attachment_image( $image->ID , 'thumbnail' ); ?></div><!--end home-thumbs--></a>
- <?php }
- } ?>
- <?php endwhile;
- // Reset Query
- wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement