Create/Register/Display Widget Area To Your Theme Files

Register a new widget area for your website

Past following code on function.php file

Example: Type Your custom widget Name


if (function_exists(‘register_sidebar’)) {


‘name’ => ‘My Widgets’,

‘id’ => ‘my-widgets’,

‘description’ => ‘The my widgets for your website.’,

‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,

‘after_widget’ => ‘</div>’,

‘before_title’ => ‘<h2>’,

‘after_title’ => ‘</h2>’


WordPress will add a new Widget area

Call the widget in your theme template php files

Enter this code into your theme files or in the file where you want to display


<?php if (!function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Extra Widgets’)) :


always back up theme files before editing!!!!!!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s