__( 'Left Sidebar', 'bizflow' ), 'id' => 'sidebar-left', 'description' => __( 'Add widgets here to appear in the left sidebar area', 'bizflow' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Right sidebar register_sidebar( array( 'name' => __( 'Right Sidebar', 'bizflow' ), 'id' => 'sidebar-right', 'description' => __( 'Add widgets here to appear in the right sidebar area', 'bizflow' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); //Array of all possible footer widget areas, displayed as column. Maximum 6 $footer_widgets = array( array( 'name' => __('Footer first column', 'bizflow'), 'description' => __('Add widgets here to appear in the first column in footer area', 'bizflow'), 'id' => 'sidebar-1' ), array( 'name' => __('Footer second column', 'bizflow'), 'description' => __('Add widgets here to appear in the second column in footer area', 'bizflow'), 'id' => 'sidebar-2' ), array( 'name' => __('Footer third column', 'bizflow'), 'description' => __('Add widgets here to appear in the third column in footer area', 'bizflow'), 'id' => 'sidebar-3' ), array( 'name' => __('Footer fourth column', 'bizflow'), 'description' => __('Add widgets here to appear in the fourth column in footer area', 'bizflow'), 'id' => 'sidebar-4' ), array( 'name' => __('Footer fifth column', 'bizflow'), 'description' => __('Add widgets here to appear in the fifth column in footer area', 'bizflow'), 'id' => 'sidebar-5' ), array( 'name' => __('Footer sixth column', 'bizflow'), 'description' => __('Add widgets here to appear in the sixth column in footer area', 'bizflow'), 'id' => 'sidebar-6' ) ); //Check option set in customizer $column_count = get_option(IP_THEME . 'footer_col_count', ip_theme_get_default_options()['footer_col_count']); //Register only as many set in customizer for($i = 0; $i < $column_count; $i++){ register_sidebar( array( 'name' => $footer_widgets[$i]['name'], 'id' => $footer_widgets[$i]['id'], 'description' => $footer_widgets[$i]['description'], 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action('widgets_init', 'ip_theme_register_widget_areas'); }