• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

Add More Sidebars to Your WordPress Theme ...

You can add more than one sidebar section to your WordPress site. For example, with the stc-intermountain.org site, I added a whole bunch of additional sidebar sections in the Appearance > Widgets section.

Adding more sidebars is useful if you’re using WordPress more as a content management system than a blog.

Someone asked me how I did this. The process isn’t hard. I’ve broken it down into three steps. (Before you continue with the instructions, you may want to back up the information in your existing sidebar.)


Step 1

Add this code to your functions.php file under Appearance > Editor.

if ( function_exists( aregister_sidebars) )
        register_sidebar(array( ame=>Sidebar Home,efore_title=><h4>,after_title=></h4>));
        register_sidebar(array( ame=>Sidebar Jobs,efore_title=><h4>,after_title=></h4>));
        register_sidebar(array( ame=>Sidebar Meetings,efore_title=><h4>,after_title=></h4>));

In this example, the sidebars that will be added will be called Sidebar Home, Sidebar Jobs, and Sidebar Meetings. Change the names to whatever you want. You can add many more sections here, not just three.

You can also add more arguments than simply name, before_title, and after-title. See the full function reference and arguments with registering sidebars.

You’ll also need to delete the previous register_sidebars function so that the two don’t conflict.


Step 2

Add a reference to the sidebar section where you want the sidebar to appear in your theme. For example, type the following to insert the Jobs sidebar:

<?php if ( !function_exists( wouldynamic_sidebar) || !dynamic_sidebar(Sidebar Jobs) ) : ?>

To insert the Meetings sidebar, you would type Sidebar Meetings rather than Sidebar Jobs.


Step 3

In a text editor, duplicate your existing sidebar code, rename the file (for example, sidebar_jobs.php), and FTP the file into the folder with your other theme files.

Where you want the file to appear (probably in a specific page template), add this reference to the file:

<?php include (TEMPLATEPATH . /sidebar_jobs.php); ?>

Remove the other code that calls the sidebar (probably get_sidebar). Now that page template will show your Jobs sidebar. And you can configure your Jobs sidebar under Appearance > Widgets.

Although I’ve mainly been calling these sections a sidebar, you can create sections and insert them anywhere in your site, such as the footer, an ad space in the header, or elsewhere.

 Original Source:
http://www.idratherbewriting.com/2010/02/07/registering-more-sidebars/

AddThis Social Bookmark Button

Posted at 12:59:52 pm | Permalink | Posted in How to Blog  

Related Stuff

Google Buzz Button Wordpress Plugin Released

If you are looking for a Google Buzz button to add into your Wordpress site then we have released the first Wordpress plugin exclusively ...

Plug And Play Ecommerce With Wordpress Plugins

Since 2003 Wordpress has slowly been gaining popularity amongst the elite of the internet, the bloggers. It is one of those few things ...

Add Google Search to Your WordPress Blog

The native WordPress search does not return very relevant results, thus it makes a lot of sense to add Google Search into your WordPress ...

Series Posting in Wordpress

In my functions.php file, I have some code which implements series posting. This relies on the thematic ...

10 Alternative Uses for WordPress

WordPress is the best and most popular blogging platform around. It’s free, easy to use, endlessly customizable and supported by ...

Top Stuff

Free Blogger templates Anime Themes

Wordpress Guestbook Generator Plugin

48 Unique Ways To Use WordPress

GeekLog

WordPress Single Post Templates

Get The Image WordPress Plugin



About Webloglines

Webloglines is a project offers a comprehensive collection of blogging services, articles, themes and plugins from around the world. Whether you're looking to promote your own blog or find blogs on various topics, this site is for you.


Search


Topics

  • Adsense (12)
  • Blogging Tips (73)
  • Blogs Slides (25)
  • Blogs Websites (22)
  • Digg (20)
  • How to Blog (129)
  • Search Engines (9)
  • SEO (135)
  • WordPress Plugins (269)
  • WordPress Security (75)
  • Wordpress Themes (99)
  • Wordpress Tips (162)

© 2006 www.webloglines.com. All Rights Reserved. Powered by IRange