Support » Themes and Templates » WordPress sidebar

Viewing 4 replies - 1 through 4 (of 4 total)
  • You don’t just edit CSS for this. You have to edit your theme and add an area for a sidebar and style it.

    some part of the needed coding is described here:
    http://codex.wordpress.org/Widgetizing_Themes

    if you want to have a separate sidebar template, you’ll also need: http://codex.wordpress.org/Function_Reference/get_sidebar

    the more complex part is to create the html structure and css to integrate the sidbar into your theme’s structure (as already rightly mentioned by @potentweb)

    in general, review http://codex.wordpress.org/Theme_Development

    Yes. Ok. In mainindex.php I have

    <div id="sidebar-nou">
    <?php if ( ! dynamic_sidebar( 'sidebar-nou' ) ) : ?>
    <?php endif; ?>
    </div>

    In sidebar.php I have:

    <?php if ( ! dynamic_sidebar( 'sidebar-nou' ) ) : ?>
    
    <?php endif; ?>

    And in CSS:

    #sidebar-nou {float: left;
        margin-left: 7.6%;
        margin-right: 0;
        margin-top: 20px;
        width: 22.8%; /* increased sidebar width 4% from 18.8% to 22.8% */
    }

    But, it is shown in footer, and I don’t know why. The site: http://www.androidmaniac.net

    the location is caused by where you added the sidebar – within the #content div just like the other divs (#reclama and #androboxline);
    you possibly need to move the #sidedar-nou div to before or after the #content div; add ‘float:left;’ to the style of #content, restrict the width of the #content etc…
    maybe try and make a pure html/css mockup of your site’s structure to figure out the formatting and positioning.

    unfortunately, this WordPress forum is not the place to explain and teach those fundamental formatting issues; try to improve your html/css knowledge by working with tutorials such as http://www.w3schools.com/, or possibly ask for support at a different forum such as http://www.css-discuss.org/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress sidebar’ is closed to new replies.