Advertisement
alchymyth

ad 3 loop

Feb 6th, 2012
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.45 KB | None | 0 0
  1. <div class="box">
  2.  
  3.     <?php
  4.        
  5.         $the_query = new WP_Query('cat=-'. $GLOBALS[ex_feat] . ',-' . $GLOBALS[ex_vid] . '&showposts=' . get_option('woo_other_entries') . '&orderby=post_date&order=desc');
  6.        
  7.         $counter = 0; $counter2 = 0;
  8.                
  9.         while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
  10.     ?>
  11.    
  12.         <?php $counter++; $counter2++; ?>
  13.  
  14.     <?php if ($counter == 3) : ?>
  15.         <div class="post fc">
  16.     <div class="google_ad_post">
  17.         <br /><?php echo $counter; ?><img src="****" alt="post ad">
  18.     </div>
  19.         </div>
  20.     <?php $counter++; $counter2++;
  21.      endif; ?>
  22.                
  23.         <div class="post fc">
  24.        
  25.        
  26.             <?php
  27.             if ($get_the_category[0]) {
  28.             echo '<h2><a href="' . get_category_link( $get_the_category[0]->term_id ) . '">' . $get_the_category[0]->cat_name . '</a></h2>';
  29.             }
  30.             ?>
  31.             <?php woo_image('height=225&width=250&class=th'); ?>
  32.             <h3><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  33.                    
  34.         </div><!--/post-->
  35.        
  36.        
  37.         <?php if ( !($counter2 == get_option('woo_other_entries')) && ($counter == 0) ) { echo '<div class="hl-full"></div>'; ?> <div style="clear:both;"></div> <?php } ?>
  38.    
  39.     <?php endwhile; ?>
  40.    
  41.     <div class="fix" style="height:20px"></div>
  42.        
  43.     <p class="ar hl3"><a href="<?php echo get_option('woo_archives'); ?>" class="more"><?php _e('SEE MORE ARTICLES IN THE ARCHIVE',woothemes); ?></a></p>
  44.    
  45. </div><!--/box-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement