• I’m using the “amazing grace” theme which has 2 sidebars, left and right. I would like to add a 3rd sidebar which would sit directly above the left and right sidebars and extend the full width of both left and right sidebars.

    I really have only the vaguest idea about how to do this as I have almost no experience with coding and editing files etc.

    I began by adding the new sidebar in functions.php and creating a sidebar-top.php file but the new side bar had then taken the place of the left sidebar.

    I think the problem is in adding styles in css but have no idea how to correct it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • hi,
    u r simply new side bar in function.php.
    and goto Dashboard and put some widget in that field and see your front.
    now u want to adjust your widget according to css.
    where u want that

    Thread Starter jrcollins

    (@jrcollins)

    I would like the new sidebar to extend the full width of both the left and right sidebars.
    Actually, it dosen’t even have to be a widget, I just want to add some static content there.

    thanks.

    Thread Starter jrcollins

    (@jrcollins)

    this is the “register widgetized sidebars” section in my functions.php file:

    // register widgetized sidebars
    if (function_exists(‘register_sidebar’)) {
    register_sidebar(array(‘name’ => ‘Left Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”%2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h4>’, ‘after_title’ => ‘</h4>’, ));
    register_sidebar(array(‘name’ => ‘Right Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”%2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h4>’, ‘after_title’ => ‘</h4>’, ));

    I copied one of the entries and then pasted it above the first entry and renamed it ‘name’ => ‘Top Sidebar’.

    This adds “top sidebar” to my widgets but if I add a widget to it it shows up in the left sidebar position and is only the width of the left sidebar.

    This is the CSS entry for left and right sidebars:

    #sidebar-left
    {
    background:#FCFCFC;
    border:1px #ccc dashed;
    font-size:1em;
    float:left;
    margin-left:20px;
    width:198px;
    padding:.5em .2em 2em 1em;
    }

    #sidebar-right
    {
    font-size:1em;
    float:left;
    margin-left:14px;
    width:153px;

    I tried adding #sidebar-top with a width equal to the left and right sidebars combined and various float/clear combinations but nothing seems to work.

    u put this widget and give live url.

    Thread Starter jrcollins

    (@jrcollins)

    my site address is: https://www.travelbooksasia.com
    ok, I now have the calendar and blogroll widget in the top sidebar, the archives widget in the left sidebar and the search widget in the right sidebar.
    As you can see the search widget has disappeared and my archives widget has moved from the left sidebar to the right sidebar. Also the top sidebar has extended down into the left sidebar position.

    I want the top sidebar to sit on top of the right and left sidebar and be equal to the width of both the left and right sidebars combined.

    you’ve edited functions.php, and style.css (and that seems to be ok

    – what about your edits to sidebar.php?

    have you duplicated for instance the sidebar-left section, copied it to the top of sidebar.php (after the <div id="sidebar"> line), and renamed id="sidebar-left" to id="sidebar-top" ?

    Thread Starter jrcollins

    (@jrcollins)

    actually, I didn’t add anything to style.css yet.
    Would it be better to create a separate sidebar.php file?
    Any ideas?

    Thread Starter jrcollins

    (@jrcollins)

    I’m trying to add a map in the new sidebar, see website: https://www.travelbooksasia.com
    Can’t seem to get it to extend the full width of the left and right sidebar columns.
    Also, the right sidebar widget (search) is now situated underneath the left sidebar widget (archives).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘new sidebar on top of left and right sidebars’ is closed to new replies.