advantage_widgets_init

The Advantage advantage widgets init function.

Description

advantage_widgets_init(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function advantage_widgets_init() { 
  2. register_widget( 'advantage_Recent_Post' ); 
  3. register_widget( 'advantage_Navigation' ); 
  4. register_widget( 'advantage_Marketing' ); 
  5.  
  6. // Full Sidebar  
  7. register_sidebar( array( 
  8. 'name' => __( 'Blog Widget Area (Full)', 'advantage' ),  
  9. 'id' => 'full-widget-area',  
  10. 'description' => __( 'Available for Left or Right sidebar layout.', 'advantage' ),  
  11. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  12. 'after_widget' => '</li>',  
  13. 'before_title' => '<h4 class="widget-title">',  
  14. 'after_title' => '</h4>',  
  15. ) );  
  16. // First Sidebar - left or right 
  17. register_sidebar( array( 
  18. 'name' => __( 'Blog Widget Area 1', 'advantage' ),  
  19. 'id' => 'first-widget-area',  
  20. 'description' => __( 'Blog Widget Area 1', 'advantage' ),  
  21. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  22. 'after_widget' => '</li>',  
  23. 'before_title' => '<h4 class="widget-title">',  
  24. 'after_title' => '</h4>',  
  25. ) ); 
  26.  
  27. // Second Sidebar - left or right 
  28. register_sidebar( array( 
  29. 'name' => __( 'Blog Widget Area 2', 'advantage' ),  
  30. 'id' => 'second-widget-area',  
  31. 'description' => __( 'Blog Widget Area 2', 'advantage' ),  
  32. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  33. 'after_widget' => '</li>',  
  34. 'before_title' => '<h4 class="widget-title">',  
  35. 'after_title' => '</h4>',  
  36. ) ); 
  37.  
  38. // Header Widget Area 
  39. register_sidebar( array( 
  40. 'name' => __( 'Header Widget Area (Left)', 'advantage' ),  
  41. 'id' => 'left-widget-area',  
  42. 'description' => __( 'Header Widget Area (Left)', 'advantage' ),  
  43. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  44. 'after_widget' => '</li>',  
  45. 'before_title' => '<h4 class="widget-title">',  
  46. 'after_title' => '</h4>',  
  47. ) ); 
  48.  
  49. register_sidebar( array( 
  50. 'name' => __( 'Header Widget Area (Right)', 'advantage' ),  
  51. 'id' => 'right-widget-area',  
  52. 'description' => __( 'Header Widget Area (Right)', 'advantage' ),  
  53. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  54. 'after_widget' => '</li>',  
  55. 'before_title' => '<h4 class="widget-title">',  
  56. 'after_title' => '</h4>',  
  57. ) ); 
  58. register_sidebar( array( 
  59. 'name' => __( 'Header Widget Area (Center)', 'advantage' ),  
  60. 'id' => 'center-widget-area',  
  61. 'description' => __( 'Header Widget Area (Center)', 'advantage' ),  
  62. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  63. 'after_widget' => '</li>',  
  64. 'before_title' => '<h4 class="widget-title">',  
  65. 'after_title' => '</h4>',  
  66. ) ); 
  67.  
  68. // Home Widget Areas 
  69. register_sidebar( array( 
  70. 'name' => __( 'Home Widget Area 1', 'advantage' ),  
  71. 'id' => 'first-home-widget-area',  
  72. 'description' => __( 'Home Widget Area 1', 'advantage' ),  
  73. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  74. 'after_widget' => '</li>',  
  75. 'before_title' => '<h4 class="widget-title">',  
  76. 'after_title' => '</h4>',  
  77. ) ); 
  78. register_sidebar( array( 
  79. 'name' => __( 'Home Widget Area 2', 'advantage' ),  
  80. 'id' => 'second-home-widget-area',  
  81. 'description' => __( 'Home Widget Area 2', 'advantage' ),  
  82. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  83. 'after_widget' => '</li>',  
  84. 'before_title' => '<h4 class="widget-title">',  
  85. 'after_title' => '</h4>',  
  86. ) ); 
  87. register_sidebar( array( 
  88. 'name' => __( 'Home Widget Area 3', 'advantage' ),  
  89. 'id' => 'third-home-widget-area',  
  90. 'description' => __( 'Home Widget Area 3', 'advantage' ),  
  91. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  92. 'after_widget' => '</li>',  
  93. 'before_title' => '<h4 class="widget-title">',  
  94. 'after_title' => '</h4>',  
  95. ) ); 
  96. register_sidebar( array( 
  97. 'name' => __( 'Home Widget Area 4', 'advantage' ),  
  98. 'id' => 'fourth-home-widget-area',  
  99. 'description' => __( 'Home Widget Area 4', 'advantage' ),  
  100. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  101. 'after_widget' => '</li>',  
  102. 'before_title' => '<h4 class="widget-title">',  
  103. 'after_title' => '</h4>',  
  104. ) ); 
  105. register_sidebar( array( 
  106. 'name' => __( 'Home Widget Area 5', 'advantage' ),  
  107. 'id' => 'fifth-home-widget-area',  
  108. 'description' => __( 'Home Widget Area 5', 'advantage' ),  
  109. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  110. 'after_widget' => '</li>',  
  111. 'before_title' => '<h4 class="widget-title">',  
  112. 'after_title' => '</h4>',  
  113. ) ); 
  114.  
  115. // Footer Widgets 
  116. register_sidebar( array( 
  117. 'name' => __( 'Footer Widget Area 1', 'advantage' ),  
  118. 'id' => 'first-footer-widget-area',  
  119. 'description' => __( 'Footer Widget Area 1', 'advantage' ),  
  120. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  121. 'after_widget' => '</li>',  
  122. 'before_title' => '<h5 class="widget-title">',  
  123. 'after_title' => '</h5>',  
  124. ) ); 
  125.  
  126. register_sidebar( array( 
  127. 'name' => __( 'Footer Widget Area 2', 'advantage' ),  
  128. 'id' => 'second-footer-widget-area',  
  129. 'description' => __( 'Footer Widget Area 2', 'advantage' ),  
  130. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  131. 'after_widget' => '</li>',  
  132. 'before_title' => '<h5 class="widget-title">',  
  133. 'after_title' => '</h5>',  
  134. ) ); 
  135.  
  136. register_sidebar( array( 
  137. 'name' => __( 'Footer Widget Area 3', 'advantage' ),  
  138. 'id' => 'third-footer-widget-area',  
  139. 'description' => __( 'Footer Widget Area 3', 'advantage' ),  
  140. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  141. 'after_widget' => '</li>',  
  142. 'before_title' => '<h5 class="widget-title">',  
  143. 'after_title' => '</h5>',  
  144. ) ); 
  145.  
  146. register_sidebar( array( 
  147. 'name' => __( 'Footer Widget Area 4', 'advantage' ),  
  148. 'id' => 'fourth-footer-widget-area',  
  149. 'description' => __( 'Footer Widget Area 4', 'advantage' ),  
  150. 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',  
  151. 'after_widget' => '</li>',  
  152. 'before_title' => '<h5 class="widget-title">',  
  153. 'after_title' => '</h5>',  
  154. ) );