Guest User

funtions.php

a guest
Apr 12th, 2022
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. function catchresponsive_child_widgets_init() {
  2. //Optional Sidebar two for page and post
  3. register_sidebar( array(
  4. 'name' => __( 'Optional Sidebar Four', 'catch-responsive-pro' ),
  5. 'id' => 'sidebar-optional-four',
  6. 'description' => __( 'This is Optional Sidebar Four', 'catch-responsive-pro' ),
  7. 'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-wrap">',
  8. 'after_widget' => '</div><!-- .widget-wrap --></section>',
  9. 'before_title' => '<h4 class="widget-title">',
  10. 'after_title' => '</h4>',
  11. ) );
  12.  
  13. //Optional Sidebar Five for page and post
  14. register_sidebar( array(
  15. 'name' => __( 'Optional Sidebar Five', 'catch-responsive-pro' ),
  16. 'id' => 'sidebar-optional-five',
  17. 'description' => __( 'This is Optional Sidebar Five', 'catch-responsive-pro' ),
  18. 'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-wrap">',
  19. 'after_widget' => '</div><!-- .widget-wrap --></section>',
  20. 'before_title' => '<h4 class="widget-title">',
  21. 'after_title' => '</h4>',
  22. ) );
  23.  
  24. /* You can add as many widgets as you want to.*/
  25. }
  26. add_action( 'widgets_init', 'catchresponsive_child_widgets_init', 99 );
  27.  
  28. /**
  29. * Returns an array of metabox sidebar options registered for catchresponsive.
  30. *
  31. * @since Catch Responsive 1.0
  32. */
  33. function catchresponsive_metabox_sidebar_options() {
  34. $sidebar_options = array(
  35. 'main-sidebar' => array(
  36. 'id' => 'catchresponsive-sidebar-options',
  37. 'value' => 'default-sidebar',
  38. 'label' => esc_html__( 'Default Sidebar', 'catch-responsive-pro' )
  39. ),
  40. 'optional-sidebar-one' => array(
  41. 'id' => 'catchresponsive-sidebar-options',
  42. 'value' => 'optional-sidebar-one',
  43. 'label' => esc_html__( 'Optional Sidebar One', 'catch-responsive-pro' )
  44. ),
  45. 'optional-sidebar-two' => array(
  46. 'id' => 'catchresponsive-sidebar-options',
  47. 'value' => 'optional-sidebar-two',
  48. 'label' => esc_html__( 'Optional Sidebar Two', 'catch-responsive-pro' )
  49. ),
  50. 'optional-sidebar-three' => array(
  51. 'id' => 'catchresponsive-sidebar-options',
  52. 'value' => 'optional-sidebar-three',
  53. 'label' => esc_html__( 'Optional Sidebar three', 'catch-responsive-pro' )
  54. ),
  55. 'optional-sidebar-four' => array(
  56. 'id' => 'catchresponsive-sidebar-options',
  57. 'value' => 'optional-sidebar-four',
  58. 'label' => esc_html__( 'Optional Sidebar Four', 'catch-responsive-pro' )
  59. ),
  60. 'optional-sidebar-five' => array(
  61. 'id' => 'catchresponsive-sidebar-options',
  62. 'value' => 'optional-sidebar-five',
  63. 'label' => esc_html__( 'Optional Sidebar Five', 'catch-responsive-pro' )
  64. )
  65. );
  66. return apply_filters( 'sidebar_options', $sidebar_options );
  67. }
Advertisement
Add Comment
Please, Sign In to add comment