Wordpress Related Pages


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. if($post->post_parent)
  3. $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&sort_column=ID");
  4. else
  5. $children = "";
  6. if ($children) { ?>
  7. <br /><h2>Folgendes könnte Sie auch interessieren:</h2>
  8. <ul id="related_pages">
  9. <?php echo $children; ?>
  10. </ul>
  11. <?php } ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.