Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'widgets_init', 'theme_slug_widgets_init' );
- function theme_slug_widgets_init() {
- register_sidebar( array(
- 'name' => __( 'Main Sidebar', 'theme-slug' ),
- 'id' => 'sidebar-1',
- 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ),
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '</li>',
- 'before_title' => '<h2 class="widgettitle">',
- 'after_title' => '</h2>',
- ) );
- }
- <--! Вывод сайдбара -->
- <?php dynamic_sidebar('Main Sidebar'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement