'switch', 'settings' => 'businessmax_options[blog_section]', 'label' => esc_html__( 'Blog Enable', 'business-max' ), 'section' => 'blog_section', 'default' => $option['blog_section'], 'choices' => array( 'on' => esc_html__( 'Enable', 'business-max' ), 'off' => esc_html__( 'Disable', 'business-max' ), ), ) ); Kirki::add_field( 'business_max_config', array( 'type' => 'text', 'settings' => 'businessmax_options[blog_title]', 'label' => esc_html__( 'Section Title', 'business-max' ), 'section' => 'blog_section', 'default' => $option['blog_title'], ) ); Kirki::add_field( 'business_max_config', array( 'type' => 'textarea', 'settings' => 'businessmax_options[blog_subtitle]', 'label' => esc_html__( 'Section Subtitle', 'business-max' ), 'section' => 'blog_section', 'default' => $option['blog_subtitle'], ) ); Kirki::add_field( 'business_max_config', array( 'type' => 'select', 'settings' => 'businessmax_options[blog_noofshow]', 'label' => esc_html__( 'No. of posts to show', 'business-max' ), 'section' => 'blog_section', 'default' => $option['blog_noofshow'], 'multiple' => 1, 'choices' => array( 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, ), ) ); Kirki::add_field( 'business_max_config', array( 'type' => 'select', 'settings' => 'businessmax_options[blog_orderby]', 'label' => esc_html__( 'Order By:', 'business-max' ), 'section' => 'blog_section', 'default' => $option['blog_orderby'], 'multiple' => 1, 'choices' => array( 'default' => esc_html__('Default', 'business-max'), 'id' => esc_html__('ID', 'business-max'), 'author' => esc_html__('Author', 'business-max'), 'title' => esc_html__('Title', 'business-max'), 'date' => esc_html__('Date', 'business-max'), 'comment_count' => esc_html__('Comment Count', 'business-max'), 'menu_order' => esc_html__('Order by Page Order', 'business-max'), 'rand' => esc_html__('Random order', 'business-max'), ), ) ); Kirki::add_field( 'business_max_config', array( 'type' => 'select', 'settings' => 'businessmax_options[blog_order]', 'label' => esc_html__( 'Order', 'business-max' ), 'section' => 'blog_section', 'default' => $option['blog_order'], 'multiple' => 1, 'choices' => array( 'desc' => esc_html__('Descending', 'business-max'), 'asc' => esc_html__('Ascending', 'business-max'), ), ) ); $categories = get_categories( array( 'hide_empty' => 1, ) ); $cats = array(); foreach($categories as $cat){ $cats[$cat->term_id] = $cat->name; } Kirki::add_field( 'business_max_config', array( 'type' => 'select', 'settings' => 'businessmax_options[blog_cat]', 'label' => esc_html__( 'Blog Category', 'business-max' ), 'section' => 'blog_section', 'default' => $option['blog_cat'], 'multiple' => 1, 'choices' => $cats, ) ); ?>