firsttec_widgets_init

Register widgetized areas, including two sidebars and four widget-ready columns in the footer.

Description

firsttec_widgets_init(); 

To override firsttec_widgets_init() in a child theme, remove the action hook and add your own function tied to the init hook.


Usage

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

Defined (1)

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

/functions.php  
  1. function firsttec_widgets_init() { 
  2. // Area left, located at the left of the sidebar. Empty by default. 
  3. register_sidebar( array( 
  4. 'name' => __( 'Left Widget Area', 'firsttec' ),  
  5. 'id' => 'left-widget-area',  
  6. 'description' => __( 'The left widget area', 'firsttec' ),  
  7. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  8. 'after_widget' => '</li>',  
  9. 'before_title' => '<h3 class="widget-title">',  
  10. 'after_title' => '</h3>',  
  11. ) ); 
  12.  
  13. // Area 1, located at the top of the sidebar. 
  14. register_sidebar( array( 
  15. 'name' => __( 'Primary Widget Area', 'firsttec' ),  
  16. 'id' => 'primary-widget-area',  
  17. 'description' => __( 'The primary widget area', 'firsttec' ),  
  18. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  19. 'after_widget' => '</li>',  
  20. 'before_title' => '<h3 class="widget-title">',  
  21. 'after_title' => '</h3>',  
  22. ) ); 
  23.  
  24. // Area 2, located below the Primary Widget Area in the sidebar. Empty by default. 
  25. register_sidebar( array( 
  26. 'name' => __( 'Secondary Widget Area', 'firsttec' ),  
  27. 'id' => 'secondary-widget-area',  
  28. 'description' => __( 'The secondary widget area', 'firsttec' ),  
  29. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  30. 'after_widget' => '</li>',  
  31. 'before_title' => '<h3 class="widget-title">',  
  32. 'after_title' => '</h3>',  
  33. ) ); 
  34.  
  35. // Area 3, located in the footer. Empty by default. 
  36. register_sidebar( array( 
  37. 'name' => __( 'First Footer Widget Area', 'firsttec' ),  
  38. 'id' => 'first-footer-widget-area',  
  39. 'description' => __( 'The first footer widget area', 'firsttec' ),  
  40. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  41. 'after_widget' => '</li>',  
  42. 'before_title' => '<h3 class="widget-title">',  
  43. 'after_title' => '</h3>',  
  44. ) ); 
  45.  
  46. // Area 4, located in the footer. Empty by default. 
  47. register_sidebar( array( 
  48. 'name' => __( 'Second Footer Widget Area', 'firsttec' ),  
  49. 'id' => 'second-footer-widget-area',  
  50. 'description' => __( 'The second footer widget area', 'firsttec' ),  
  51. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  52. 'after_widget' => '</li>',  
  53. 'before_title' => '<h3 class="widget-title">',  
  54. 'after_title' => '</h3>',  
  55. ) ); 
  56.  
  57. // Area 5, located in the footer. Empty by default. 
  58. register_sidebar( array( 
  59. 'name' => __( 'Third Footer Widget Area', 'firsttec' ),  
  60. 'id' => 'third-footer-widget-area',  
  61. 'description' => __( 'The third footer widget area', 'firsttec' ),  
  62. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  63. 'after_widget' => '</li>',  
  64. 'before_title' => '<h3 class="widget-title">',  
  65. 'after_title' => '</h3>',  
  66. ) ); 
  67.  
  68. // Area 6, located in the footer. Empty by default. 
  69. register_sidebar( array( 
  70. 'name' => __( 'Fourth Footer Widget Area', 'firsttec' ),  
  71. 'id' => 'fourth-footer-widget-area',  
  72. 'description' => __( 'The fourth footer widget area', 'firsttec' ),  
  73. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  74. 'after_widget' => '</li>',  
  75. 'before_title' => '<h3 class="widget-title">',  
  76. 'after_title' => '</h3>',  
  77. ) );