• I just installed the Blix theme by Sebastian Schmieg for my girlfriend, modified the CSS and added some pages. It’s viewable @ https://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 “

    • $page_title
    • \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 “

    • $page_title
    • \n”;
      }

      in the header.php file.

      These are the contents of the header.php file I have:

      >

      a€¢ >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, @ https://www.kingcosmonaut.de/blix/

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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 https://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.

    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.

    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….

    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 https://www.salesteamtools.com

    Thanks…

    Put it in single.php (<?php get_sidebar(); ?>).

    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?

    https://www.salesteamtools.com

    Take it out of header.php and put it in sidebar.php and restyle it in your css

    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… ??

    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?

    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.