View difference between Paste ID: TGvgAUyU and kjkJQPR7
SHOW: | | - or go back to the newest paste.
1-
<?php query_posts( array( 'category__and' => array(1), 'posts_per_page' => 2, 'orderby' => 'title', 'order' => 'DESC' ) );
1+
<?php query_posts( array( 'category__and' => array(1), 'orderby' => 'title', 'order' => 'DESC' ) );
2
3
while ( have_posts() ) : the_post(); ?>
4
5
<?php
6-
$args = array( 'post_type' => 'attachment', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID );
6+
$args = array( 'post_type' => 'attachment', 'orderby' => 'menu_order', 'posts_per_page' => 6, 'order' => 'DESC', 'post_mime_type' => 'image', 'post_status' => null, 'post_parent' => $post->ID );
7
$images = get_posts($args);
8
    if ($images) {
9-
    $count = 0;
9+
    
10
    foreach ( $images as $image ) { ?>   
11
      <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>
12-
      <?php $count++; ?>
12+
    
13-
      <?php if ($count == 6) break; ?>
13+
14
    } ?>
15
16
	<?php endwhile;
17
18
	// Reset Query
19
	wp_reset_query(); ?>