• I’m putting together a whole bunch of wordpress Pages in a hierarchy of sorts with 3 levels.

    On each child page I want to display a subnav of it’s siblings. In fact I have an image specified inside each page’s custom field. So on every page I want to display icons of it’s siblings at the same level. (Also on their parent page.)

    I tried working through wp_list_pages(), but it some how evades me.

    A clue would be appreciated.

Viewing 1 replies (of 1 total)
  • Thread Starter sepiamystery

    (@sepiamystery)

    I figured some of this. On wp codex site. To list all children pages at the same level:

    <?php if($post->post_parent)
    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&sort_column=menu_order");
    else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&sort_column=menu_order");
    if ($children) { ?>
    <ul><?php echo $children; ?></ul><?php } ?>

    I also want to display a meta value (icon-image) associated with each page along with the list. Can anyone shed light on this? How do I pick up meta value while using the wp_list_pages function.

    cheers
    hd

Viewing 1 replies (of 1 total)
  • The topic ‘Finding ids of pages at the same level’ is closed to new replies.