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


Hire WordPress Experts: Building Your Online Presence with Confidence

April 10, 2024

WordPress can help you create an online presence that is effective for your company. WordPress is a top-rated content management system. To harness its power, you need WordPress specialists. What...

Why Should Your Hire Freelance Web Developer: The Top Benefits

May 17, 2022

When developing a website or an app, there are two major ways to do it - outsource the job to a web development company or hire a freelancer to get...

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...