• Im using 2.7. Fixed width, 2-column theme, and Ive finally got my blog set up (colour/theme) that I like. (I dont want to search for another 3-column theme and customise again!)

    I would like to add a second sidebar to the left, so I can move some of the widgets and content over and not be so full on the right sidebar.
    I would also have to increase the fixed width to accomodate the extra sidebar.

    Can someone please tell me how to do it? (Im not that code savvy – but can find areas of code and edit when told to)

    here is my blog addie so you can see what Im currently working with.
    http://www.purplerealm.net/blog

    Any help would be sooo appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I took a two-column theme I had, and made it three column, and it required that I modify the index.php file to include a reference to an additional template file

    <?php include (TEMPLATEPATH . '/leftsidebarfront.php'); ?>

    I had a right sidebar in the existing theme, so this code had to be added to just after the get_header instruction.

    So that add the sidebar, and the leftsidebarfront.php file contained all the content info I wanted to add (some feeds from assorted other sites).

    Then I had to edit the style.css file so that the width of the new sidebar was estabished and positioned correctly.

    The existing page area had to be modified to allow the sidebar to fit within the page width, and I shrunk the content area slightly.

    That’s a very general description of what to do, and it will take a little bit of tweaking your existing theme to get the spacing right. You’ll have to widen your page width if you want to keep your content area width the same.

    Everything else depends on what you have on your style.css file and how it all needs to flow.

    Hope that helps get you started.

    Thread Starter purplesrealm

    (@purplesrealm)

    Thanks heaps David. I thought those were the things that I would have to do. I guess the best way to learn to do this type of thing is compare the code of a 3-column theme with mine and make the changes – just go and do it….I guess. LOL
    Thanks heaps for answering me! 😀

    You’re welcome, Purple.

    Some things are easy to explain in a few words, other things… well, you just have to “get your hands dirty” and try it out and see why things work, or don’t work.

    Studying other themes is a great way to see how things work. I’ve had to do it a few times.

    DavidBorrink, seems like Im in the same position as you were. I did most of the coding and it shows up, but on the top of my posts, not exactly on the left side. Can you tell me what have you changed in style.css file? im using this theme http://wordpress.pro/wordpress-themes/smilies-army-10/ thanks

    Timoxa,

    I looked at the theme you linked to, and I’m a little confused if your theme has a switchable sidebar or not, since I didn’t load it and try it, but examined the style.css file only.

    My situation actually didn’t involve changing the whole site, but in adding a front page template based on the index.php file from the default theme after it was modified with my look. Same basic structure, different widths and graphics, that is.

    I modified index.php into an additional template called front.php and made “narrowcolumn” into “front column” and set the width differently. Then I changed the “sidebar” on the template to “sidebarfront” and added a new left sidebar called “leftsidebarfront”.

    So my regular pages still had two columns, “narrowcolumn” and “sidebar”, but my front page had the three mentioned above. (this is all before widgets came about, by the way)

    Here’s the structure css for each column:

    #sidebarfront
    {
    	padding: 20px 0 10px 0;
    	margin-left: 650px;
    	width: 200px;
    	}
    
    #leftsidebarfront
    {
    	float: left;
    	padding: 20px 0 10px 0;
    	margin-left: 25px;
    	width: 200px;
    	}
    
    .frontcolumn {
    	float: left;
    	padding: 0 0 20px 40px;
    	margin: 0px 0 0;
    	width: 350px;
    	}

    and here’s my “page” structure code

    #page {
    	background-color: white;
    	margin: 0 auto;
    	padding: 0;
    	width: 875px;
    	border: 1px solid #959596;
    	}

    I had to put the content of “leftsidebarfront” in a template called “leftsidebarfront.php” and call it up in “front.php” with

    <?php include (TEMPLATEPATH . '/leftsidebarfront.php'); ?>

    and that was placed just after the <?php get_header(); ?>. The leftsidebarfront.php template only contained the content of the sidebar which was enclosed in the div tags for “leftsidebarfront”.

    Hopefully this gives you some tips that could help you tweak your theme properly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add second sidebar to current theme’ is closed to new replies.