Can anyone help me on how to add two sidebars on the main page of my WordPress site. I need one on the left and the right. I'm new to WordPress and don't know much about the code, even when I tried reading the codex. My website is here I am using a Ready To be theme, with Ready E-Commerce plugin


Use this in your funtions.php to register sidebar

if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=>'Sidebar ',
        'before_widget' => '<div>',
        'after_widget' => '</div>',
        'before_title' => '<p>',
        'after_title' => '</p>',

To use it in your theme use the following

    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar') ) :

Refer this to know more : http://codex.wordpress.org/Function_Reference/register_sidebar

| improve this answer | |
  • Okay, so I will just put both of these into functions.php right? – lozadaOmr Nov 11 '13 at 8:35
  • No...use the first one in functions.php. Use the second one in your template page to call the sidebar instead of get_sidebar() – MidhuN Nov 11 '13 at 8:37
  • Can you mark it as the "answer" if you have got what you were looking for? – MidhuN Nov 11 '13 at 10:47

use register_sidebar function.register sidebar.

for using on your themes;

<?php if ( is_dynamic_sidebar('sidebar-name') ) {
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.