• melilyn

    (@melilyn)


    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter melilyn

    (@melilyn)

    *bump*

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

    peiqinglong

    (@peiqinglong)

    I’m a bit confused…so you’re trying to list child pages also?

    Are you trying to do it like this: https://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.

    Thread Starter melilyn

    (@melilyn)

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional sidebar sections’ is closed to new replies.