Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 22nd, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 20  |  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. <ul>
  2. <?php
  3. global $post;
  4. $thePostID = $post->ID;
  5. $parentID2 = get_post_meta ($post->ID, 'parentID', true);
  6. $args = array( 'numberposts' => 5, 'offset'=> 1, 'category' => 395 );
  7.  
  8. if ($thePostID == $parentID2) {
  9. $myposts = get_posts( $args );
  10.  
  11.  
  12. foreach( $myposts as $post ) :  setup_postdata($post); ?>
  13.  
  14.         <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  15.  
  16. <?php endforeach; }?>
  17. </ul>