WordPress.org

Ready to get started?Download WordPress

Forums

How to make 2 sidebar in a WordPress theme? (6 posts)

  1. Ashleybigheart
    Member
    Posted 5 years ago #

    I want to make 2 sidebars in my WordPress but I don't know how to link them.
    I want it in 3 columns:
    Left - Sidebar1 (sidebar.php)
    Middle - Content (index.php)
    Right - Sidebar2 (sidebar2.php)

    I've used the code <?php get_sidebar(); ?> in the index.php but I don't know how to link the second on in the index.php file.

    Is that actually possible? I'm a total noob with this.
    Thank in advance.

  2. Samuel B
    moderator
    Posted 5 years ago #

    the easiest way to do it would be to download a theme that is already like that and see how they do it or mod that one.

    basically, you will have 2 sidebar calls in index.php, page.php and single.php

    <?php get_sidebar(); ?>
    and
    <?php get_sidebar_1(); ?>

    you would also define the second sidebar in the theme's style.css

  3. Ashleybigheart
    Member
    Posted 5 years ago #

    Oh I see.
    But I've already coded and designed a layout myself, is there a way to integrate it?

    My layout basecode is like this one: 3 column layout

  4. Samuel B
    moderator
    Posted 5 years ago #

    if you follow the theme guide you can do about anything
    http://codex.wordpress.org/Theme_Development

  5. Ashleybigheart
    Member
    Posted 5 years ago #

    thank you really much for the link
    I stumbled on the this page http://codex.wordpress.org/Function_Reference/get_sidebar

    How do I register <?php get_sidebar('left'); ?> <?php get_sidebar('right'); ?> this.
    I mean, how should my sidebar code look like when I'm using <?php get_sidebar('left'); ?> and <?php get_sidebar('right'); ?> in my index.php?

  6. emmakarin@gmail.com
    Member
    Posted 4 years ago #

    Please can anyone help me to align my 2 sidebars in my wordpress page http://www.lustigblogg.nu?

    I want it in 3 columns:
    Left - Sidebar1 (sidebar.php)
    Middle - Content (index.php)
    Right - Sidebar2 (sidebar2.php)

    It looks good in Firefox but not IE.

    Appreciate very much any suggestions.

Topic Closed

This topic has been closed to new replies.

About this Topic