Create Widget Region in WordPress

PHP Tutorial

Go to the following Folder

***\wp-content\themes\your_theme

And edit the function.php file

add_action( ‘widgets_init’, ‘your_theme_widgets_init’);

function your_theme_widgets_init() {
register_sidebar( array(
‘name’ => __( ‘Sidebar 1’, ‘your_theme’ ),
‘id’ => ‘sidebar-1’,
‘description’ => __( ‘Appears on posts and pages except the optional Front Page template, which has its own widgets’, ‘wonder’ ),
‘before_widget’ => ‘<aside id=”%1$s”>’,
‘after_widget’ => ‘</aside>’,
‘before_title’ => ‘<h3>’,
‘after_title’ => ‘</h3>’,
) );

register_sidebar( array(
‘name’ => __( ‘Sidebar 2’, ‘your_theme’ ),
‘id’ => ‘sidebar-2’,
‘description’ => __( ‘Appears when using the optional Front Page template with a page set as Static Front Page’, ‘wonder’ ),
‘before_widget’ => ‘<aside id=”%1$s”>’,
‘after_widget’ => ‘</aside>’,
‘before_title’ => ‘<h3>’,
‘after_title’ => ‘</h3>’,
) );

register_sidebar( array(
‘name’ => __( ‘Sidebar 3’, ‘your_theme’ ),
‘id’ => ‘sidebar-3’,
‘description’ => __( ‘Appears when using the optional Front Page template with a page set as Static Front Page’, ‘wonder’ ),
‘before_widget’ => ‘<aside id=”%1$s”>’,

View original post 208 more words

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s