Ever had a layout with two or more sidebars? The standard convention is to put both sidebars inside
sidebar.php if they’re beside each other, or one in
header.php and the other in the standard sidebar template. However, there’s a quick little WordPress trick that actually allows for two separate sidebar templates.
You’ll need two files:
sidebar-right.php. The first will contain the first sidebar on the left of the page, and the second, obviously, contains the area for the right of the page.
Now, in your template files, you can use the
<?php get_sidebar(); ?> function to call the left sidebar, as usual. But now that you’ve added a second file,
<?php get_sidebar('right'); ?> can be used to call the “right” sidebar file from the template. Note: the “right” file is the only file that seems to work; ‘sidebar-left’ will not.