Revolution template structure
The Revolution Music theme has 4 sidebar files, used as follows:- sidebar_home.php – only used on the home page
- sidebar.php – used on all pages apart from the home page
- sidebar_left.php – “sub” sidebar, shown on all pages
- sidebar_right.php – “sub” sidebar, shown on all pages
Make a new sidebar
Let’s make the new sidebar, which we want to display when viewing a single blog post page, ie when index.php is used to display a single article or blog entry. Step 1: Make a copy of sidebar.php Step 2: Rename the copy sidebar_single.php Step 3: Then, open up your single blog post file, in this case index.php, and find this line of code:<?php include(TEMPLATEPATH."/sidebar.php");?>
<?php include(TEMPLATEPATH."/sidebar_single.php");?>
Customising the new sidebar
Well that’s all fine and dandy, but sidebar_single.php is exactly the same as the original sidebar.php that it replaces, and there’s not much point in making the new sidebar unless we customise its content. In the case of the Revolution Music theme, the standard sidebar.php displays a misture of hardcoded content – ie content that is coded directly into sidebar.php such as the video, newsletter etc – and dynamic content – ie widgets. Let’s say we have some widgets which we only want to display in sidebar_single.php. To do this we need to make a couple more coding changes to our theme files. Step 4: Open up sidebar_single.php and find this line of code:<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(4) ) : else : ?>
- sidebar.php – dynamic_sidebar(1)
- sidebar_left.php – dynamic_sidebar(2)
- sidebar_right.php – dynamic_sidebar(3)
<?php if ( function_exists('register_sidebars') ) register_sidebars(3);
<?php if ( function_exists('register_sidebars') ) register_sidebars(4);







I really like this and believe after reading the well written instructions I am going to attempt to change a sidebar on my forum page. I would like to add a sidebar that shows my affiliate providers. Not sure it will work with my width, but want to see! Thanks for the great post!
Thanks for your nice comment, Candace! Glad you found the article useful.
If you run into any problems, feel free to post a question on the forum.
Excellent How-To, well written and easy to follow adding studiograsshopper to my live feeds folder. Off now to do some sidebar pimping.
@ Countzero
Thanks very much! Glad you enjoyed the article.
Like it.
awsome …. i.ve used what u writed here :X 10x