Forums

[resolved] listing Pages, sub-Pages and sub-sub-Pages (5 posts)

  1. mzimmers
    Member
    Posted 4 years ago #

    Hi -

    I could use some help here. I want my sidebar to list the name of the current page, all sibling pages, AND pages all the way up the heirarchy, like this:

    grandparent page
    parent page
    sibling 1
    sibling 2
    current page
    sibling 3

    and so on. I can't figure out how to indent here, but I would have these indented to reflect the heirarchy. I'll worry about getting them sorted and formatted, but I could use some help in generating the list.

    I've looked at the codex for wp_list_pages and the Fold Page List function as well. I can't get either of them to work quite the way I want them to.

    Can someone help me out, please?

  2. MichaelH
    Volunteer
    Posted 4 years ago #

    Using the template tag, wp_list_pages(), code in the wp-content/themes/default/sidebar.php produces a hierarchical display of Pages.

    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>

    Oops, see you want the hierarchy for just the current page--have to ponder that. Don't think it is too easy.

  3. mzimmers
    Member
    Posted 4 years ago #

    Well, I'm willing to give up on having the full hierarchy if it makes things easier. What I really want is to always have the parent page available in the sidebar for easy back-navigation. That's the one thing that's missing from the fold page list stuff.

    Any ideas are very welcome.

  4. WPITn2shape
    Member
    Posted 4 years ago #

    If you want indents - I think there's CSS? Some themes come with it like that. Hold!

    ...

    I CANNOT find the code or css that does it (I liked it, tried to), but the indenting is in a theme called Freedom Pink. (And I'm sure lots of other new ones.)

    Here it is:

    http://themes.wordpress.net/columns/3-columns/2372/freedom-pink-widgetized/

    You can't see it well, here's where I've implimented the theme:

    (Despite the domain name, the site's safe to look at, even at work, well currently, nah photos will never have nudes. lol)

    http://thexxinxxx.com/

  5. mzimmers
    Member
    Posted 4 years ago #

    Thanks for the suggestions, people. So...does anyone have any ideas on extending the fold page list functionality to a three-tier page hierarchy?

Topic Closed

This topic has been closed to new replies.

About this Topic