Forums

Listing pages, but only sub-pages of the current page (4 posts)

  1. apa@imagix.dk
    Member
    Posted 1 year ago #

    I have put the following code in a php widget...
    <?php wp_list_pages('title_li=&depth=2&child_of=22'); ?>

    ...in order to display my pages (childs of page 22, "Gallery). Tjeck it out...

  2. http://www.anderspeter.com/gallery/greenland-2010/favorites
  3. This list becomes a bit long though. How do I NOT list sub-pages - other than those at the same level (same parrent) as the current page?

    Am I making sense?

  • David Gwyer
    Member
    Posted 1 year ago #

    Try using depth=1

  • apa@imagix.dk
    Member
    Posted 1 year ago #

    Thanks ...already tried that. Does the same thing. Maybe it's because I have child_of set to a specific sub-page as well (the Gallery page/22)

    The various direct sub-pages to nr. 22, "Greenland 2009", "Greenland 2010" etc. I would like shown, but not their sub-pages - unless you are on one of them of course - then just that page siblings should be shown, so that visitor can browse the different galleries under "Greenland 2009" for instance.

  • apa@imagix.dk
    Member
    Posted 1 year ago #

    Could this be done using CSS instead maybe?

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.