widgets.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. /**
  3. Sidebar widget area (theme default).
  4. **/
  5. // function luceo_widgets_init() {
  6. // register_sidebar( array(
  7. // 'name' => esc_html__( 'Sidebar', 'luceo' ),
  8. // 'id' => 'sidebar-1',
  9. // 'description' => '',
  10. // 'before_widget' => '<section id="%1$s" class="widget %2$s">',
  11. // 'after_widget' => '</section>',
  12. // 'before_title' => '<h2 class="widget-title">',
  13. // 'after_title' => '</h2>',
  14. // ) );
  15. // }
  16. // add_action( 'widgets_init', 'luceo_widgets_init' );
  17. //Push/Pull sidebar widgets
  18. function push_sidebar_widgets_init() {
  19. register_sidebar( array(
  20. 'name' => 'Push/Pull Sidebar',
  21. 'description' => __( 'Widgets displayed at push/pull sidebar.', 'luceo' ),
  22. 'id' => 'push_sidebar_widgets',
  23. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  24. 'after_widget' => '</div>',
  25. 'before_title' => '<h3 class="widget-title">',
  26. 'after_title' => '</h3>',
  27. ) );
  28. }
  29. add_action( 'widgets_init', 'push_sidebar_widgets_init' );
  30. //Philosophy sidebar widgets
  31. function philosophy_widgets_init() {
  32. register_sidebar( array(
  33. 'name' => 'Philosophy Sidebar',
  34. 'description' => __( 'Widgets displayed at Philosophy page.', 'luceo' ),
  35. 'id' => 'philosophy_widgets',
  36. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  37. 'after_widget' => '</div>',
  38. 'before_title' => '<h3 class="widget-title">',
  39. 'after_title' => '</h3>',
  40. ) );
  41. }
  42. add_action( 'widgets_init', 'philosophy_widgets_init' );
  43. //Blog sidebar widgets
  44. function blog_widgets_init() {
  45. register_sidebar( array(
  46. 'name' => 'Blog/News Sidebar',
  47. 'description' => __( 'Widgets displayed at blog/news page.', 'luceo' ),
  48. 'id' => 'blog_widgets',
  49. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  50. 'after_widget' => '</div>',
  51. 'before_title' => '<h3 class="widget-title">',
  52. 'after_title' => '</h3>',
  53. ) );
  54. }
  55. add_action( 'widgets_init', 'blog_widgets_init' );
  56. //Footer widgets
  57. function footer_widgets_init() {
  58. register_sidebar( array(
  59. 'name' => 'Footer Widgets #1',
  60. 'description' => __( 'Widgets displayed at footer.', 'luceo' ),
  61. 'id' => 'footer_widgets_1',
  62. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  63. 'after_widget' => '</div>',
  64. 'before_title' => '<h3 class="widget-title">',
  65. 'after_title' => '</h3>',
  66. ) );
  67. register_sidebar( array(
  68. 'name' => 'Footer Widgets #2',
  69. 'description' => __( 'Widgets displayed at footer.', 'luceo' ),
  70. 'id' => 'footer_widgets_2',
  71. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  72. 'after_widget' => '</div>',
  73. 'before_title' => '<h3 class="widget-title">',
  74. 'after_title' => '</h3>',
  75. ) );
  76. register_sidebar( array(
  77. 'name' => 'Footer Widgets #3',
  78. 'description' => __( 'Widgets displayed at footer.', 'luceo' ),
  79. 'id' => 'footer_widgets_3',
  80. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  81. 'after_widget' => '</div>',
  82. 'before_title' => '<h3 class="widget-title">',
  83. 'after_title' => '</h3>',
  84. ) );
  85. register_sidebar( array(
  86. 'name' => 'Footer Widgets #4',
  87. 'description' => __( 'Widgets displayed at footer.', 'luceo' ),
  88. 'id' => 'footer_widgets_4',
  89. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  90. 'after_widget' => '</div>',
  91. 'before_title' => '<h3 class="widget-title">',
  92. 'after_title' => '</h3>',
  93. ) );
  94. }
  95. add_action( 'widgets_init', 'footer_widgets_init' );