SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php get_header() ?> | |
| 2 | <?php $removeDuplicates = array(); ?> | |
| 3 | <div id="cntt"> | |
| 4 | <?php $cnt_args=array( | |
| 5 | 'cat' => 27, | |
| 6 | 'posts_per_page' => 1); | |
| 7 | $regQueen = new WP_Query($cnt_args); | |
| 8 | while ( $regQueen->have_posts() ) : $regQueen->the_post(); ?> | |
| 9 | <h1><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> | |
| 10 | <?php the_content('Continue ...');
| |
| 11 | $removeDuplicates[] = get_the_ID(); | |
| 12 | endwhile; | |
| 13 | wp_reset_query(); ?> | |
| 14 | </div> | |
| 15 | <div id="risi"> | |
| 16 | <h2>Images</h2> | |
| 17 | <?php $img_args=array( | |
| 18 | 'cat'=> -27, | |
| 19 | 'post__not_in' => $removeDuplicates, | |
| 20 | - | 'posts_per_page' => 5, |
| 20 | + | 'posts_per_page' => -1, |
| 21 | ); | |
| 22 | $imageQueen = new WP_Query($img_args); | |
| 23 | - | while ( $imageQueen->have_posts() ) : $imageQueen->the_post(); |
| 23 | + | $counter = 0; |
| 24 | - | <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> |
| 24 | + | while ( $imageQueen->have_posts() && $counter < 6 ) : $imageQueen->the_post(); |
| 25 | - | <?php echo get_the_post_thumbnail($thumbnail->ID, 'thumbnail') ?> |
| 25 | + | if( has_post_thumbnail() ) : ?> |
| 26 | - | </a> |
| 26 | + | <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> |
| 27 | - | <?php $removeDuplicates[] = get_the_ID(); |
| 27 | + | <?php echo get_the_post_thumbnail($thumbnail->ID, 'thumbnail') ?> |
| 28 | </a> | |
| 29 | <?php $removeDuplicates[] = get_the_ID(); | |
| 30 | $counter++; | |
| 31 | endif; | |
| 32 | endwhile; | |
| 33 | wp_reset_query(); ?> | |
| 34 | ||
| 35 | </div> | |
| 36 | <div id="lesi"> | |
| 37 | <h2><?php echo date(" F d");?></h2>
| |
| 38 | <?php get_search_form(); ?> | |
| 39 | <?php $oth_args=array( | |
| 40 | 'post__not_in' => $removeDuplicates, | |
| 41 | 'posts_per_page' => 10, | |
| 42 | ); | |
| 43 | $otherQueen = new WP_Query($oth_args); | |
| 44 | while ( $otherQueen->have_posts() ) : $otherQueen->the_post(); | |
| 45 | <h4><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4> | |
| 46 | endwhile; | |
| 47 | wp_reset_query(); ?> | |
| 48 | </div> | |
| 49 | <?php get_footer() ?> |