Title: Conditional sidebar sections
Last modified: August 18, 2016

---

# Conditional sidebar sections

 *  [melilyn](https://wordpress.org/support/users/melilyn/)
 * (@melilyn)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/conditional-sidebar-sections/)
 * 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](https://wordpress.org/support/users/melilyn/)
 * (@melilyn)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/conditional-sidebar-sections/#post-539835)
 * *bump*
 * Sorry. It’s three pages buried and I still have this question.
 *  [peiqinglong](https://wordpress.org/support/users/peiqinglong/)
 * (@peiqinglong)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/conditional-sidebar-sections/#post-539836)
 * 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/](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.
 *  Thread Starter [melilyn](https://wordpress.org/support/users/melilyn/)
 * (@melilyn)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/conditional-sidebar-sections/#post-539886)
 * 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.

## Tags

 * [blix](https://wordpress.org/support/topic-tag/blix/)
 * [child](https://wordpress.org/support/topic-tag/child/)
 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [parent](https://wordpress.org/support/topic-tag/parent/)

 * 3 replies
 * 2 participants
 * Last reply from: [melilyn](https://wordpress.org/support/users/melilyn/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/conditional-sidebar-sections/#post-539886)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
