How to add more sidebar or widget section : WordPress

How to add more sidebar or widget section : WordPress

November 22, 2011 Wordpress sidebar has many feature and we can customize that just drag and drop widgets. If we talk about developer end, we can use widget feature to customize our blog. We can as many as side bar and can manage from admin. For example, if we want to add feature in footer where we can manage the important links. Some developer do same thing without adding new widget section. They just insert links in footer.php. But it can be done easily and we can manage it from widget. below are the step to add new sidebar: 1) Opne function.php which will be located on your theme, if not there just make. 2) Just need to insert below code between php tag (<?php ?>) if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name'=>'widget_section_name', 'before_widget' => ' ', 'after_widget' => ' ', 'before_title' => ' ', 'after_title' => ' ', )); } 3) Above code will register a new widget section. Now its time to call it in our theme. 4) You make a new php file like footer-link.php or directly insert the below code in where you want to add new sidebar <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('widget_section_name) ) : ?> <?php endif; ?> 5) Its Done. Now you can use new widget section.

Related Posts

from my blog


Improve The Reach of Your Business With WordPress Development Services

December 28, 2015

Social media marketing has undoubtedly changed the game between companies that are constantly in competition with each other. Not only has social media allowed better access to customer thought and...

Must Have Anti-Spam and Security WordPress Plugins

March 30, 2015

WordPress, is a hugely popular open source community platform which is also referred as a CMS. It's user friendly CMS that makes it very flexible and allows users to make...

Highly used WordPress Plug-Ins

March 25, 2015

Plugins, as the name suggest, are great tools which are used to enhance the functionality of WordPress blogs by addition of a wide range of useful features. They are basically...