WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] adding a 2. sidebar (left) to the P2 theme (9 posts)

  1. yeshileyed
    Member
    Posted 4 years ago #

    Hi, i love P2 theme and i want to use it for my new website. but i want to add a 2. sidebar to the left. i have tried many times but i can't do that. left sidebar appears, position is true but i have problem with the sleeve main and main area. maybe i only need to change the CSS file but i don't know which codes. Can somebody please help me how to do it correctly? Thank you...

  2. s_ha_dum
    Member
    Posted 4 years ago #

    Sounds like a CSS problem. Post the URL to the site please.

  3. yeshileyed
    Member
    Posted 4 years ago #

    Hi, thank you for your reply, actually i'm testing that on a test url and i've made all css changes back to defaults, that's so annoying i can't find the right way. creating and placing left sidebar is ok but the main and sleeve main looks bad. i can give you my css file details.
    style css is here
    rtl stylesheet is here
    i've added this code to functions.php :

    if ( function_exists('register_sidebars') )
    register_sidebars(2);

    and i've created a php file named sidebar2.php
    i use this code to include 2. sidebar (in header.php) :
    include (TEMPLATEPATH . '/sidebar2.php');
    creating, displaying and positioning 2. sidebar with no error.
    but when i do all that the main and sleeve main parts look bad.I'm waiting for some help, thank you again.

  4. Zulfikar Nore
    Member
    Posted 4 years ago #

    Find all instances of sidebar in your stylesheet and duplicate them renaming sidebar to sidebar2 - shortcut!

    If you knew much of coding css you could redefine the entries to support both sidebars.

  5. yeshileyed
    Member
    Posted 4 years ago #

    "Find all instances of sidebar in your stylesheet and duplicate them renaming sidebar to sidebar2" i did it, 2. sidebar appears and i made float: left; and it's on the left side but the problem is with the main content. i don't know much about CSS styling that's the problem. i need some CSS help. Thank you...

  6. s_ha_dum
    Member
    Posted 4 years ago #

    Its very hard to understand the problem when I can't see the problem, but I did take a look at the P2 theme and I think maybe you need to edit the #main part of your stylesheet, adding a width attribute to make room for the new sidebar. But, really, there is probably a hundred ways to do this and I don't know what look you trying to achieve. Maybe a screenshot of the problem?

  7. yeshileyed
    Member
    Posted 4 years ago #

    ok, here is how it looks : site

    Here is Style CSS :

    Here is Rtl Stylesheet :

    2. sidebar is registered, and placed but #main and sleeve main parts look bad.

  8. yeshileyed
    Member
    Posted 4 years ago #

    sorry about the css links, they're here :

    RTL STYLESHEET

    CSS STYLESHEET

    I don't know much about CSS styling so it's better when somebody write the codes that i need as a reply (uploading whole CSS will be much more better)

  9. yeshileyed
    Member
    Posted 4 years ago #

    Finally, i made it on my own, thanks to the people who tried to help me...
    :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags