Advertisement
HarunRRayhan

WP Register Sidebar

Aug 16th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. /**
  2.  * Register Course and Lesson sidebar
  3.  *
  4.  * @author HarunRRayhan
  5.  */
  6. function twentythirteen_widgets_init() {
  7.     register_sidebar( array(
  8.         'name'          => __( 'Main Widget Area', 'twentythirteen' ),
  9.         'id'            => 'sidebar-1',
  10.         'description'   => __( 'Appears in the footer section of the site.', 'twentythirteen' ),
  11.         'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  12.         'after_widget'  => '</aside>',
  13.         'before_title'  => '<h3 class="widget-title">',
  14.         'after_title'   => '</h3>',
  15.     ) );
  16.  
  17.     register_sidebar( array(
  18.         'name'          => __( 'Secondary Widget Area', 'twentythirteen' ),
  19.         'id'            => 'sidebar-2',
  20.         'description'   => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ),
  21.         'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  22.         'after_widget'  => '</aside>',
  23.         'before_title'  => '<h3 class="widget-title">',
  24.         'after_title'   => '</h3>',
  25.     ) );
  26. }
  27. add_action( 'widgets_init', 'twentythirteen_widgets_init' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement