• Hello Everyone!

    I have finally found a theme that I am happy with….but I

    would like to add a sidebar on the right hand side. I have

    placed a basic sidebar.php within the theme, but I need

    some help with the css.

    Here is the site: theblogconnection.com

    Thanks for the help.

    Mike

Viewing 7 replies - 1 through 7 (of 7 total)
  • You would need a bit more than “some help with the css”.
    You need basic HTML lessons. Find a theme that has sidebar and don’t sweat it.

    Thread Starter perykm

    (@perykm)

    I know html, I just dont know much of php and css. Where would I start?

    Well, if you knew html you would know where to place that sidebar…
    And if you don’t know css then don’t start a big job like modifying a theme of a script that you are not familiar with. It is not an “one-click” job.

    Thread Starter perykm

    (@perykm)

    Well thats rude. Thanks for the help “moderator”… anyone else?

    Moshu: I have to agree, you were rude.

    perykm: Take a look at the style sheet for the theme you’re using. Note how the sidebar or sidebars are defined. I’m new at css etc. myself, but I do know placement of a sidebar involves deciding on where it’s going to float and where the margins are going to be. You’ll also need to change a margin for the content area.

    There are (x)html and css tutorial sites available on the web, they can help you. Spend some time on those sites learning the basics and try out any practice areas they provide. BTW, my place has a couple of links to css/(x)html tutorial sites. However, until I get a tag updated you’ll have to go scrolling down until you find them. The W3 tutorial site is especially good. Good luck.

    moshu was VERY, VERY rude. No need for that, man.

    moshu is right its not a one click job…. on the other heand its relatively easy to explain for the basic placement, to give the concept of the work, so as to… you know… help…

    To have it appear you’ll need to
    use some basic concepts.

    for one, your sidebar should be enclosed in a div. this so you can later refer to it in your stylesheet as .sidebar

    <div class="sidebar">
    </div>

    is a good start
    now everything in it should be in an unordered list

    so now like this

    <div class="sidebar">
    <ul>
    </ul>
    </div>

    now it just depends on what you want in it.
    heres a small example

    <div class="sidebar">
    <ul>
    <?php wp_get_bookmarks(); ?>
    </ul>
    </div>

    that will display your blogroll

    now…
    open your index.php
    go to the bottom and if there are closing body and html tags in your themes index.php file, you’ll want to place the following before them, but most likely after the last closing div tag.

    <?php get_sidebar(); ?>

    this is all highly dependant on how that theme is designed.
    you’d be well reccomended to go download the boook at wpdesigner.com. it will teach you step by step, the third part especially on how to hand code a theme from scratch.

    anyway now to get it to appear on the right side, well that just takes some stylesheet programming…

    I assume it’ll be a work in progress to just get here with it.

    something like

    .sidebar{
    	float: left;
    	width: 175px;
    	margin: 0 0 0 1px;
    }

    as you can see there your telling it to align left it it’s “box”, the box you defined using the div class of sidebar earlier. your telling it that this box is 175px wide, your width may vary, and your padding it 1 px, thats just me in one theme… you’ll have to play to see the effects.

    in addition
    you may need to adjust other div “boxes” attributes, or the attributes of what are in them for it to work out right, this is another one of those moments where it just depends..

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Placement of Sidebar!’ is closed to new replies.