Forum Replies Created

Viewing 1 replies (of 1 total)
  • <?php 
    
    $Pages      = wp_list_pages('title_li=&echo=0&depth=1');
    $InnerPages = wp_list_pages('child_of='.($post->post_parent != false ? $post->post_parent : $post->ID).'&title_li=&echo=0');
    $Title      = ($post->post_parent != false) ? trim(get_the_title($post->post_parent)) : trim(wp_title('', false));
    if($Title != '')
      $Pages      = str_replace($Title.'</a></li>',
                                $Title.'</a>'.
                                '<ul>'.$InnerPages.'</ul></li>',
                                $Pages);
    echo $Pages;
    unset($Pages, $InnerPages);
    
    ?>

    It’s a slightly dirty method but it works…

Viewing 1 replies (of 1 total)