How can i HIDE the parent page link when ON the parent page? (1 post)

  1. Justin Sternberg
    Posted 5 years ago #

    i have links in my sidebar, and right now, they contain the current parent page, and the child pages of the current parent page.
    Is there a way i can HIDE the parent page link when ON the parent page, (yet still showing child pages) and then show it again when ON a child page? Have not been able to find the answer anywhere.
    The site is currently at http://fitzfi.com/wordpress/
    my code currently looks like this:

    $parent_title = get_the_title($post->post_parent);?>
    <a href="<?php echo get_permalink($post->post_parent) ?>"><?php echo $parent_title;?></a>
    <ul class="children">
      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      if ($children) {
      <?php echo $children; ?>
      <?php } ?>

    or see it here: http://drp.ly/Ue6ab

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by Justin Sternberg
  • This topic is not resolved
  • WordPress version: 2.9.1