Title: Adding a sidebar.
Last modified: August 18, 2016

---

# Adding a sidebar.

 *  [renn](https://wordpress.org/support/users/renn/)
 * (@renn)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/adding-a-sidebar/)
 * I just installed the Blix theme by Sebastian Schmieg for my girlfriend, modified
   the CSS and added some pages. It’s viewable @ [http://www.ifeelfine.nl](http://www.ifeelfine.nl).
   Now my problem is this:
 * In the “Sociologie” page, there are supposed to be several subpages. Now, whenever
   I add a page, with “Sociologie” as the parent, it automatically gets added to
   the main navigation. This is the Blix standard:
 * Additional Pages
    You can set up as many pages as you like. All pages will be
   automatically added to the navigation. However if you’ve set up all of the above
   pages, additional pages will probably break the navigation unless you don’t modify
   the CSS to make the buttons smaller.
 * But, I’d like to add these pages to the sidebar for “Sociology”, instead of the
   main navigation. In the Blix help file this is said about ‘secondary navigation’:
 * Secondary Navigation
    In case you’ve got more pages than fit into the main navigation
   Blix offers a secondary navigation in the sidebar: Make backup copies of header.
   php and sidebar.php Open header.php in your text editor of choice Look for the
   following code snippet else { (is_page($page_id))?$selected = ‘ class=”selected”‘:
   $selected=”; echo “
    - 
    - \n”;
       } and remove it Save the modified file Open sidebar.php Change line 
      10 from * to */ Remove line 20 (<?php */ ?>) Save the modified file
    - I tried this (I assumed it would add a sidebar to all the main pages), but
      the first problem I encountered was that there was no such snippet
    - else {
       (is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”; echo“
    - 
    - \n”;
       }
    - in the header.php file.
    - These are the contents of the header.php file I have:
    - >
    -  â€¢ >Home ID; $page_title = $page->post_title; $page_name = $page->post_name;
      if ($page_name == “archives”) { (is_page($page_id) || is_archive() || is_search()
      || is_single())?$selected = ‘ class=”selected”‘:$selected=”; echo “Archives\
      n”; } elseif($page_name == “about”) { (is_page($page_id))?$selected = ‘ class
      =”selected”‘:$selected=”; echo “About\n”; } elseif ($page_name == “contact”){(
      is_page($page_id))?$selected = ‘ class=”selected”‘:$selected=”; echo “Contact\
      n”; } elseif ($page_name == “about_short”) {/*ignore*/} } } ?>
    - So I took out the last part because it resembled the snippet mostly, and edited
      the sidebar.php file, but after I saved and uploaded, it completely messed
      up my CSS.
    - So my question is:
    - (1)How do I add a sidebar to additional pages, (2) how do I add subpages to
      that sidebar?
    - Like I said, I’m using Blix by Sabastian Schmieg, @ [http://www.kingcosmonaut.de/blix/](http://www.kingcosmonaut.de/blix/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [bhull](https://wordpress.org/support/users/bhull/)
 * (@bhull)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244633)
 * Renn,
 * I can’t answer your question, but I do have one for you! You added the main sidebar
   to each of the pages as well, not just the posts. May I ask what code you added
   to do that?
 * My site is at [http://www.salesteamtools.com](http://www.salesteamtools.com).
   I’ve customized the Blix theme, including adding Ultimate Tag Warrior plug-in,
   so the sidebar is already a bit customized, but I want it to repeat everywhere
   else…how did you get that done?
 * Thanks.
 *  [nigelmellish](https://wordpress.org/support/users/nigelmellish/)
 * (@nigelmellish)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244636)
 * I was able to put up a sidebar on pages by modding the page.php – drop in:
 * <?php get_sidebar(); ?>
 * right after the get_header argument and before the “comment”…
 * Now, anybody have any ideas how I can get the sidebar to display something other
   than the Pages Menu? If I find out I’ll let you know.
 *  [nigelmellish](https://wordpress.org/support/users/nigelmellish/)
 * (@nigelmellish)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244637)
 * Renn:
 * I struggled with this: “But, I’d like to add these pages to the sidebar for “
   Sociology”, instead of the main navigation. In the Blix help file this is said
   about ‘secondary navigation’:”
 * For a while. You need to add an argument after this in header.php:
 * elseif ($page_name == “about_short”) {/*ignore*/}
 * After that I added the following:
 * elseif ( $page_id>8 )
 * Because I didn’t want any page with an id greater than 8 to show up.
 * Hope this helps….
 *  [bhull](https://wordpress.org/support/users/bhull/)
 * (@bhull)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244641)
 * Nigel,
 * I don’t want my Pages to show the sidebar, but can you tell me how to put the
   same sidebar that’s on my index.php on the individual post pages? I’m going for
   consistency…and would rather have my “tags” than the calendar.
 * Site’s at [http://www.salesteamtools.com](http://www.salesteamtools.com)
 * Thanks…
 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244642)
 * Put it in single.php (<?php get_sidebar(); ?>).
 *  [bhull](https://wordpress.org/support/users/bhull/)
 * (@bhull)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244644)
 * Thanks Beel. I got what I wanted.
 * Now, I’m wanting to move my search box and button from the navigation row to 
   the top part of the sidebar.
 * Any suggestions?
 * [http://www.salesteamtools.com](http://www.salesteamtools.com)
 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244645)
 * Take it out of header.php and put it in sidebar.php and restyle it in your css
 *  [Rimmon](https://wordpress.org/support/users/rimmon/)
 * (@rimmon)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244654)
 * I’d like to have the sidebar on the pages. I know somebody has asked this before,
   but I’ve tried pretty much everything. I’ve put the <?php get_sidebar(); ?> in
   the pages.php and archives.php, I’ve even changed <div id=”container”> in header.
   php. There is still no sidebar on my pages. I have even tried to copy the heme…/
   index.php and pase inside into the pages.php file, so it was the same, but still
   no sidebar even though it works on index.php. I really have no idea what to do…
   🙁
 *  [cheeseballpuff](https://wordpress.org/support/users/cheeseballpuff/)
 * (@cheeseballpuff)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244658)
 * I have a question about the search. I moved the search bar to my sidebar and 
   now I want to resize the size of the search bar and the Go!. Where should I go
   to edit that?
 *  [cheeseballpuff](https://wordpress.org/support/users/cheeseballpuff/)
 * (@cheeseballpuff)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244659)
 * I also tried putting the sidebar on all my posts, but the instructions above 
   did not work.. unless I’m doing it wrong?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Adding a sidebar.’ is closed to new replies.

## Tags

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

 * 10 replies
 * 6 participants
 * Last reply from: [cheeseballpuff](https://wordpress.org/support/users/cheeseballpuff/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/adding-a-sidebar/#post-244659)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
