Forums

How Do I Add a 2nd Sidebar? (5 posts)

  1. kenfar
    Member
    Posted 6 years ago #

    I would like to add a sidebar to the right side of my blog. I am using the Fleur De Lys theme. I think I understand how the initial left hand sidebar works. I basically want to duplicate tthe left sidebar and placce it on the right side as well. I understand how to go through and edit the content and or the plugins -- but not how to actually get the page to call for the second sidebar.

    http://www.sr747-eagles.org/blog

    Thanks,
    Ken

  2. vkaryl
    Member
    Posted 6 years ago #

    You'll have to use a normal php include call for the other sidebar.

  3. kenfar
    Member
    Posted 6 years ago #

    Hi vkaryl,

    '<?php get_sidebar(); ?>' I think this is what you are talking about. If so what determines placement?

  4. Mem
    Member
    Posted 6 years ago #

    I just did mine and followed this advice from someone

    "There are several things you must do, firstly you must add in your css a menu navigation- I copy the sidebar css and name it #menu in the css right under the sidebar css. Second you must add this code (a few lines down from the top depending on what theme you are using) to your index.php (main template), archive.php, page.php, search.php (search results), single.php (single post), and 404.php if you have it.

    <?php
    require('menu.php');
    ?>

    <div id="content" class="narrowcolumn">

    Copy your sidebar.php in your text editor and change it to the example below (noting in red bold to change the name from sidebar or whatever it's named to menu):

    <div id="menu">

      <!-- Begin Navigation -->

    • <h2>:: Welcome ::</h2>
    • <!-- End Navigation -->

      <!-- Begin Calendar -->

    • <h2>:: Calendar ::</h2><?php get_calendar(1); ?>
    • <!-- End Calendar -->

    </div>

    Then save the page as menu.php. (yours will be different)

    Now you need to see what your theme looks like now, if your content area is too large and causes the new sidebar to drop or other weird things happen you will need to adjust your content area of your css possibly for size but this also depends on what type of theme you are using fluid or fixed. "

    With mine I copied the sidebar template and named it menu. then I copied the sidebar files in the style sheet and named them menu. and changed margin-right to margin-left.

  5. kenfar
    Member
    Posted 6 years ago #

    Wow Mem,

    Very nice post! Thank you. I will give it a shot and see how it goes. This should really help to get me moving in the right direction.

    I understand the html just fine -- but I need a whole lot more work on the php side of things :-)

    Thanks,
    Ken

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags