Advertisement
alchymyth

tarski loop adsense k

Aug 3rd, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php while (have_posts()) {
  2. the_post();
  3. if (has_post_format('aside') || (get_tarski_option('asidescategory') && in_category(get_tarski_option('asidescategory')))) { // Aside loop ?>
  4. <div <?php post_class('aside'); ?> id="p-<?php the_ID(); ?>">
  5. <div class="content entry-content clearfix">
  6. <?php echo tarski_post_thumbnail(); ?>
  7. <?php the_content(__('Read the rest of this entry &raquo;','tarski')); ?>
  8. </div>
  9.  
  10. <p class="meta"><span class="date updated"><?php the_time(get_option('date_format')); ?></span><?php echo tarski_author_posts_link(''); ?> | <a class="comments-link" rel="bookmark" href="<?php the_permalink(); ?>"><?php tarski_asides_permalink_text(); ?></a><?php edit_post_link(__('edit','tarski'), ' (', ')'); ?></p>
  11.  
  12. <?php th_postend(); ?>
  13. </div>
  14. <?php } else { // Non-Aside loop ?>
  15. <div <?php post_class('entry'); ?>>
  16.  
  17. <div class="meta">
  18. <h2 class="title entry-title" id="post-<?php the_ID(); ?>">
  19. <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent link to %s', 'tarski'), the_title_attribute(array('echo' => 0))); ?>">
  20. <?php the_title(); ?>
  21. </a>
  22. </h2>
  23.  
  24. <?php echo th_post_metadata(); ?>
  25. </div>
  26.  
  27. <div class="content entry-content clearfix">
  28. <?php echo tarski_post_thumbnail(); ?>
  29. <?php the_content(__('Read the rest of this entry &raquo;','tarski')); ?>
  30. </div>
  31.  
  32. <?php th_postend(); ?>
  33. </div>
  34. <?php }
  35.  
  36. $k = 5; // set the $k value //
  37. if( ($wp_query->current_post+1)%$k == 0 && $wp_query->current_post <= 3*$k ) { ?>
  38. ADSENSE CODE
  39. <?php }
  40.  
  41. } // End entry loop ?>
  42.  
  43. <?php th_posts_nav(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement