WordPress.org

Ready to get started?Download WordPress

Forums

Two lists of pages (7 posts)

  1. Bernardhny
    Member
    Posted 8 years ago #

    One of the features I love is the ability to create pages instead of posts. Is there a way to make a second set of pages, or at least a way to make some of the pages appear under a second category heading? For example on Severedlegion.com I have the Information header with pages underneath it. I want to take the subpage under membership and put it on the other side with a header of Members. I am new to WordPress and any help you can provide would be appreciated.

    Sorry if this request fails to make sense. I am tired :(

    Thanks

    Bernard

  2. tomhanna
    Member
    Posted 8 years ago #

    Create a hierarchy of parent and child pages. The parent pages can be blank, they can be an index of the child pages or whatever works for you. Then do a separate instance of wp_list_pages for each parent page and us the child_of argument to show only the child pages for the particular parent you want to show.

    child_of
    (integer) Display only the subpages of the Page; use the numeric ID for a Page as the value. Defaults to 0 (display all pages).

    http://codex.wordpress.org/Template_Tags/wp_list_pages

  3. scg
    Member
    Posted 8 years ago #

    I am quite sure this is the solution I also was seeking, but darn if I can understand it. I want to list in the side bar two separate lists of pages. For instance, let's say a list of articles and then a space and a list of recipes. However, I am not a programmer, or close to it. I can create the parent and child pages, but doing the wp_list_pages is where I get lost. Is it at all possible to describe that in simplier terms? I work at a university, so use small words. (laugh). Or better yet, another example?
    Thanks much!
    SCG

  4. likoma
    Member
    Posted 8 years ago #

    I've done it where I use "exclude" to hide the pages I don't want to show. In your case (I've done the same thing), see below to show pages (ID#) 5,6,7,8 and the second list showing pages 1-4.

    <?php wp_list_pages('sort_column=menu_order&exclude=1,2,3,4&title_li='); ?>

    <?php wp_list_pages('sort_column=menu_order&exclude=5,6,7,8&title_li='); ?>

    I hope that helps.

  5. HullBreach
    Member
    Posted 8 years ago #

    Ok this is basically the same thing Im attempting to do, but since one portion of the website will be expanding pretty rapidly this could become unwieldy.

    Is it possible to feed some kind of operand into the mix? Basically to get an output where:

    Page set A:
    pages 1-499

    Page set B:
    Pages 500+

    Without having to individually exclude the pages from one list or the other?

    And if this is possible, how to I manually denote a page #?

    Thanks in advance! (Im a code newb too!)

  6. HullBreach
    Member
    Posted 8 years ago #

    Actually a simpler way of doing this may be to simply restrict a single parent and all its children (but not any others and their repsective children) from displaying in a list.

  7. HullBreach
    Member
    Posted 8 years ago #

    Ok I figured out how to hide a parent object to hide its chidren, but when I am in one of the childre, they all populate the nav menu making it look like crap. Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.