WordPress.org

Ready to get started?Download WordPress

Forums

Conditional sidebar sections (4 posts)

  1. melilyn
    Member
    Posted 7 years ago #

    Sorry about the length on this one.

    I'm using a modified version of Blix. The only parts that are really modified are the stylesheet (and not structurally) and the sidebar. Blix uses conditional statements to add different sections do different pages of the site. For example, single pages have a calendar on the side, while the main page does not.

    Here's the rub.

    I've got a writing section where I'm going to post two or three of the longer works of fiction I've written. In the main menu, you'll go to WRITING. On the writing page, there's a conditional statement in the sidebar that will create a menu of the different stories.

    Each link will go to a story page, and the sidebar will contain a table of contents (chapter one, chapter two, etc). Each story page is a child of the writing page.

    Each chapter will have its own page as well, which will be children of each story page. The permalink structure will come out like:
    /writing/seasons/chapter-one/

    Conditional statements for is_page("writing") and is_page("seasons") are easy enough. Is there a feasible way to add a conditional statement for each chapter page without having to go through is_page("chapter-one") || is_page("chapter-two")... so on and so forth?

    Is there some way to say "if this page is a child of 'seasons,' give it this section?

  2. melilyn
    Member
    Posted 7 years ago #

    *bump*

    Sorry. It's three pages buried and I still have this question.

  3. peiqinglong
    Member
    Posted 7 years ago #

    I'm a bit confused...so you're trying to list child pages also?

    Are you trying to do it like this: http://www.bui4ever.com/web-itecture/ ?

    The "subpages" are auto generated links whenever a new page is added to the parent page and as long as you stay within the parent page, it continues to display all the child pages.

  4. melilyn
    Member
    Posted 7 years ago #

    Possibly that could work. Where do I find the code/plugin for something like that?

Topic Closed

This topic has been closed to new replies.

About this Topic