The Revolution wordpress theme by Brian Gardner is the basis on which this website is built. A question has been raised as to how one goes about using multiple side bars or dynamic areas to display widgetised content:
![]()
Custom Featured Pages and Sidebars
This is the process that I developed for this site (please note that this works for the self-hosted version of WP only) for increasing the number of wigetised sidebars, on ‘featured pages.’
There are few items you will need
- Access to your Blog directory structure from an FTP client such as Filezilla
- Text editing software such as Notepad
The structure of Revolution
- Login to your site
- Go to Presentation
- Click on Theme Editor
- Navigate to functions_php and you will see:
<?php
if ( function_exists(‘register_sidebars’) )
register_sidebars(4);
?> - This means that there are 4 sidebars available
- Navigate to featured_page.php and scroll to the bottomof that section where you will see:<?php include(TEMPLATEPATH.”/sidebar_page.php”);?>
- This means that a featured page is calling ’sidebar_page’ to display any dynamic content
- So navigate to sidebar_page.php, where you will see:
<!– begin sidebar –><div id=”sidebar”><?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(2) ) : else : ?><h2>Text Area #1</h2>
<p>This is an area on your website where you can add text. This will serve as an informative location on your website, where you can talk about your site.</p> - This means that if there is something in ‘dynamic_sidebar(2)’ then display it or if not then display the text below
- What is ‘dynamic_sidebar(2)’ ?
- Navigate to your Widgets area and you will see this
- Sidebar 2 which has the Next Gen plugin in it already is what dynamic_sidebar(2)’ refers to. You can also see 4 spare sidebars to use as well. Note, Sidebar 1 is used as the call for the blog page
- The next step is to create additional custom featured_page templates which call on custom sidebar_pages to display content from any of the 4 available dynamic sidebars
Download
- Open up access to your blog through your favourite FTP software and navigate to: wp-content/themes/revolution/page_featured.php and download page_featured.php file to your computer
- Then navigate to wp-content/themes/revolution/sidebar_page.php and download sidebar_page.php file to your computer
Sidebars
- Navigate to sidebar_page.php and open; then within your text editor and find this section:
<?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(2) ) : else : ?> - Now change dynamic_sidebar(2) to the number of the sidebar you want, so for example if you wanted to duplicate the blog page sidebar change the 2 to a 1
- At the same time you may wish to change the text below or not as the case may be
- Save this file as sidebar_[yourname].php
Featured Pages
- Navigate to page_featured.php and open; then within your text editor and find this section:
<?php
/*
Template Name: Featured Page
*/and change ‘Featured Page’ to ‘[yourname] Page’ - Then scroll to the bottom of the page until you see this:<?php include(TEMPLATEPATH.”/sidebar_page.php”);?>and change ’sidebar_page.php’ to ’sidebar_[yourname].php’ that you prepared in step 4 in the previous section
- Save this file as page_[yourname].php that you prepared in step 1 of this section
Upload and Present
- Upload these 2 new files to wp-content/themes/revolution/
- Go to Presentation
- Click on Theme Editor and you will then see your new sidebar and featured page templates at the bottom of the list
- Now create a new page and when setting it up choose the correct template (you can see I have quite a few)

- Now when you publish that page it will appear with the sidebar you selected
Variables
- To change what is displayed in a sidebar just navigate to your widget area and drag and drop the widgets as you see fit
- You can obviously have as many page_featured.php as you wish, each calling different sidebars
- You can also have as many page_sidebars.php as you wish
- You can also set-up page_featured to not have any sidebars by removing the<?php include(TEMPLATEPATH.”/sidebar_page.php”);?>
If you would like to learn how to add widgets to the dynamic area then take a look here
show hide 3 comments