• I’m trying to use wp_list_pages to generate a navigational structure that looks like this:

    Site Home
            Sibling
            Sibling
                child
                child
                    grandchild 1
                        gg-child
                    grandchild 2
                child
            Sibling
            Sibling
    

    and so far I’m stymied. Any assistance would be hugely appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you use the “depth”-argument?

    <ul>
    <?php wp_list_pages('depth=4'); ?>
    </ul>

    Thread Starter Patrick Johanneson

    (@pjohanneson)

    I did. “depth” gives back entirely too much.

    Sorry, I might have been less than clear in my original post.

    What I have:

    A site that looks like this:

    Site Home
            Sibling
            Sibling
                child
                    grandchild 1
                        gg-child
                    grandchild 2
                child
                    grandchild 1
                        gg-child
                    grandchild 2
                child
            Sibling
                child
                    grandchild 1
                        gg-child
                    grandchild 2
                child
                    grandchild 1
                        gg-child
                    grandchild 2
                child
            Sibling
            .
            .
            .
            

    What I want:

    When I’m on the page “grandchild 1”, I want to see:
    – its immediate children, if any
    – its parent and its parent’s siblings
    – the rest of its ancestors, and their siblings

    Like so:

    Site Home
            Sibling
            Sibling
                child
                child
                    grandchild 1
                        gg-child
                    grandchild 2
                child
            Sibling
            Sibling

    laid out according to menu_order.

    Thanks!

    You could try the Plugin “Simple Section Navigation” and see if it works for you. Otherwise you would probably have to manually program that.

    Thread Starter Patrick Johanneson

    (@pjohanneson)

    Thanks for the link. I tried it and… it just gets the current page and its children.

    Back to programming. If I come up with a solution I’ll post the code here.

    I don’t know how you did it but if I try this plugin it gives current page, its siblings and only the current page’s children…
    Well… programming ist always a way to learn more… 😉

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Menu] CMS’ is closed to new replies.