Tuesday, January 10, 2012

Create custom Wiget

Hello,
For that one follow these steps -

Step 1 - Go in current themes/function.php and search for register_widget register_widget.

Step 2 - Add these lines of code
register_sidebar(array(
'name' => 'Header wiget',
'id' => 'header_wiget',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '

',
'after_title' => '

',
));

Step 3 - You see your custom wiget in admin of wordpress with name Header Wiget

Step 4 - On what place you want to call your wiget just put these lines

header_wiget is an id which is called in functions.php

Enjoy