This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 7th, 2012  |  syntax: PHP  |  size: 0.41 KB  |  views: 70  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div class="post-content">
  2. <?php
  3. $content = apply_filters('the_content', $post->post_content);
  4. $save = explode("</p>", $content);
  5. $count = 1;
  6. foreach ($save as $a){
  7. if ($count == 12){
  8.    if (strcmp( date("Y-m-d", strtotime("-10 day")), get_the_time("Y-m-d") ) > 0) {
  9.    ?>
  10. AD CODE
  11.    <?php
  12.    }
  13.    
  14. }
  15. echo $a."</p>";
  16. $count = $count + 1;
  17. }
  18. ?>
  19.                                 <?php wp_link_pages(); ?>
  20.                         </div><!-- post-content -->
clone this paste RAW Paste Data