• Hi,

    This is default navigation:

    wp_list_pages("title_li=");
    
    This is a code that displays only the child pages under current page:

    <?php
    global $wp_query;
    if( empty($wp_query->post->post_parent) ) {
    $parent = $wp_query->post->ID;
    } else {
    $parent = $wp_query->post->post_parent;
    }
    wp_list_pages(“title_li=&child_of=$parent”);
    ?> `

    Ok, I need a code that builds the following side nav:

    <Home Page>
    <Parent pages before current page>
    <current page / parent of current page>
    <pages under parent of current page>
    <rest of parent pages>

    please help me write the code.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Coding Help side navigation’ is closed to new replies.