Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement