Support » Themes and Templates » How Do You Add/Subtract Sidebars to/from a Theme

  • Explain in your reply, with no links to any other page, how to add/subtract sidebars to/from a theme. What change or changes to the style sheet code need to be made? Put everything necessary into your reply.

    (If I knew how I’d say so, but I don’t so I can’t.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • A good start is to look at the code in your theme’s sidebar.php file and get familiar with it. For example, after the funtion is_home() you can see what is included on your home page sidebar. The titles of which should (might) be contained between <h2></h2> tags and the links or text contained between <ul></ul> tags. If you would like to get rid of that section you can just delete everything between those tags (including the tags), or simply make it an HTML comment by putting <!-- at the beginning of the section and --> at the end. This way you can always use it later if you change your mind. To add a section to the sidbar on another page, copy and paste the section’s code under the function that controls what shows up in the sidebar.

    ryanfitzer, I don’t think the OP wants to add or subtract content from a sidebar, they physically want to add or subtract the sidebar column.

    Which is, IMO, far and beyond the scope of a WP support forum post, which, IS, from what I can gather, what the OP wants.

    The answer is more CSS based than WP. The issue is about how the page is displayed, relative to widths, either in pixels or %, and the overall width of the page. It’s not as simple as adding an additional PHP include to add another file worth of content. You must really dissect the style sheet and determine what and where you can add another column, THEN, you could do a <?php include 'sidebar2.php'; ?> to add your additional content.
    Since you don’t want links, I won’t bother adding any to CSS references I would suggest.

    I’ll add that deleting content might be easier, bu t the display could just as easily be borked by doing so, depending on the theme.

    Misread that one, sorry. I agree, putting in or taking out the whole sidebar would be a big redesign depending on the theme.

    ryanfitzer, it’s ok, that happens to everyone sometime lol. But, to the O.P., you “could” always use a Single Col theme, and then do like miklb basically said, just call up or have the sidebar on other pages, that you’d want the sidebar to be on or whatever maybe..

    I’m not sure though, just throwing out ideas.. =P


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How Do You Add/Subtract Sidebars to/from a Theme’ is closed to new replies.