Ads By Google

Add Left Sidebar To 2 Column WordPress Theme

Add left sidebar WordPress Theme
For a programming noob, how easy is it to add a left sidebar to a 2 column WordPress Theme that has a right sidebar? Not easy. The simple reason is, noobs like me don’t think so logically as compared to someone who has the proper training. So I spent the last two days offline just trying to add a left sidebar to this Theme that I had created with a right sidebar. Did I say it was not easy? It is now, once I begin to think logic. Here are some tips you might find useful if you are trying to add a left sidebar to your own WordPress Theme.

Before I begin, left sidebar in this case, is a sidebar on the left side of your contents and not a sidebar that is immediately to the left of your existing one which is on the right.

Think Logic.

If you have been modding themes for a while, you should know that a Theme consist of 4 core components, namely the header, the content area, the sidebar and the footer. All these are then wrapped inside what some call a container, or a wrapper or something weird that takes a little bit of guesswork. How these components appear in your Theme and how it looks depends on how you declare it in your stylesheet and how to “call” up the components when your Theme loads.

Logically, the container or wrapper should be wide enough to contain all these 4 components. So if your content area is 500 pixels wide and your sidebar is 200 pixels then common sense will tell you your container should be more than 700 pixels. Why more? That’s because you must have padding on both sides so your content do not stick to the edge if your container. For noobs, this will be on trial and error basis to get the right width. Pros have ways to calculate. I am to lazy to study that.

Now, when you look at your 2 Column Theme, the contents are separated with the sidebar. That means, the content area can be manipulated independently without effecting the sidebars and vice versa. You would be thinking, how difficult would that be to add another sidebar to the left side. Just create another sidebar php file, declare it in my stylesheet, and then call it up in all the pages I want that sidebar to appear. That should do it. Uh uh. Not so fast.

For one, all your components are already “floated” to the left in your stylesheet. Even your existing right sidebar is floated to the left. Stumped? Think logic.

The right sidebar is an independent component. It has to be floated left and the furthest it can float to the left is next to your content area. If you remove your content, then it will float all the way to the left. You might be thinking you can always change the position of your contents to the right. This will give you space for another sidebar on the left. Wrong again. Doing so will push everything to the right, including your existing sidebar which is sort of leaning on your content area for support to avoid floating all the way to the left. So what is the most logical think to do? Think. Logically.

Since you can’t align the whole content area to the right, let it stay as it is, but “wrap” it. So now you have a content wrapper, or whatever you want to call it wrapped inside the main container, or wrapper. Put your existing content area inside this wrapper. Your existing sidedar will now be getting the support from the newly created content wrapper instead of the original content area. Now you have something to play with.

Inside this content wrapper, you can float your contents to the right. It is now “trapped” inside the content wrapper so it won’t be going anywhere or pushing your existing sidebar with the new position. The newly created left sidebar is also placed inside this content wrapper, floated to the left. Yeahh.. you have a new left sidebar!!

Now all you have to do is to widgetise it, style it and call it up. More confused than you were before reading this post?

Elementary, My dear Mr. Watson. Think. Think logically.

Share This Post
Ads By Google
 

Free Updates

Subscribe to receive Free WordPress Theme Tips, Reviews and Discount Codes

Related WordPress Theme Tips

Left Sidebar For The 2 Column Neoclassical ThemeHad a request to make the sidebar float to the left for the 2 Column Neoclassical Theme. The original mod looks like what you are seeing now. These codes will...

How To Add Colors To Your Theme SidebarThere are times when you would like to add some color to your WordPress Theme’s sidebar to make it more unique, especially if you are using a free Theme which...

How To Make Rounded Corners For Your WordPress ThemeA very popular method to make rounded corners for our WordPress Themes is a workaround by using images. It will be quite lengthy to discuss this method here as it...

How To Increase The Size Of Your WordPress ThemeSize, in this instance is the size area of your blog layout and not size in terms of traffic, contents or whatever that you deemed as the bigger the better....

How To Add A No Sidebar Page To Your WordPress ThemeA reader, John asked whether it is possible to add an extra page template without any sidebars to the Soothing Theme. Seems like John would like to add a Forum...

Those who found this page were searching for:

  1. wordpress create left sidebar right sidebar
  2. move sidebar in column wordpress
  3. add sidebar in door of oppurtinities
  4. wordpress themes 2 column left sidebar
  5. add second sidebar child theme wordpress
  6. wordpress ad on right side
  7. no sidebar two column wp theme
  8. how to add a left sidebar to wordpress vigilance theme
  9. 2 column with sidebar
  10. how to add fluid header in catalyst

3 Responses to “Add Left Sidebar To 2 Column WordPress Theme”

Read below or add a comment...

  1. Marc Shaw says:

    Hey, I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog!…..I”ll be checking in on a regularly now….Keep up the good work! :)

    - Marc Shaw

  2. Costa says:

    Paul,

    I really do not understand what you mean by wrapping your contents. Do you mean like having borders around your contents?

    I see you are using the latest default theme and to have borders around your contents go to your style css, scroll down until you come to the part commented with the words, “Contents”

    Find these codes:

    #content,
    #content input,
    #content textarea {
    color: #333;
    font-size: 16px;
    line-height: 24px;
    }

    Immediately after the last line just before the closing curly bracket, add this line.

    border: 2px solid #ddd; padding: 15px;

    This will create a border around your contents. (If that is what you meant by wrapping your contents) Otherwise, I really do not know what you want.

  3. Miss Tee says:

    Um, what?
    smh.
    Please change the SEO for your site so this DOES NOT show up in google, for those people who actually want help on this subject.