twentyfourteen_widgets_init

Register three Twenty Fourteen widget areas.

Description

twentyfourteen_widgets_init(); 

Usage

  1. if ( !function_exists( 'twentyfourteen_widgets_init' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyfourteen_widgets_init(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function twentyfourteen_widgets_init() { 
  2. require get_template_directory() . '/inc/widgets.php'; 
  3. register_widget( 'Twenty_Fourteen_Ephemera_Widget' ); 
  4.  
  5. register_sidebar( array( 
  6. 'name' => __( 'Primary Sidebar', 'twentyfourteen' ),  
  7. 'id' => 'sidebar-1',  
  8. 'description' => __( 'Main sidebar that appears on the left.', 'twentyfourteen' ),  
  9. 'before_widget' => '<aside id="%1$s" class="widget %2$s">',  
  10. 'after_widget' => '</aside>',  
  11. 'before_title' => '<h1 class="widget-title">',  
  12. 'after_title' => '</h1>',  
  13. ) ); 
  14. register_sidebar( array( 
  15. 'name' => __( 'Content Sidebar', 'twentyfourteen' ),  
  16. 'id' => 'sidebar-2',  
  17. 'description' => __( 'Additional sidebar that appears on the right.', 'twentyfourteen' ),  
  18. 'before_widget' => '<aside id="%1$s" class="widget %2$s">',  
  19. 'after_widget' => '</aside>',  
  20. 'before_title' => '<h1 class="widget-title">',  
  21. 'after_title' => '</h1>',  
  22. ) ); 
  23. register_sidebar( array( 
  24. 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),  
  25. 'id' => 'sidebar-3',  
  26. 'description' => __( 'Appears in the footer section of the site.', 'twentyfourteen' ),  
  27. 'before_widget' => '<aside id="%1$s" class="widget %2$s">',  
  28. 'after_widget' => '</aside>',  
  29. 'before_title' => '<h1 class="widget-title">',  
  30. 'after_title' => '</h1>',  
  31. ) );