How to add custom sidebar in wordpress
Hello
Here Example of add custom sidebar in wordpress
register_sidebar( array(
'name ' => __( 'Header Sidebar', 'theme-slug' ) ,
'id ' => 'home-header-1',
'description ' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ) ,
'before_title' => '
',
'after_title' => '
) );
}
add_action( 'widgets_init', 'theme_slug_widgets_init' ) ;
before_title and after title : here name display h1 tag in you can change in tag . or html of before title and after title.
dynamic_sidebar( 'home-header-1' ) ;
0 komentar:
Post a Comment