add_section( 'hestia_blog_layout', array( 'title' => apply_filters( 'hestia_blog_layout_control_label', esc_html__( 'Blog Settings', 'hestia' ) ), 'priority' => 30, ) ); $options = array( 0 => ' -- ' . esc_html__( 'Disable section', 'hestia' ) . ' -- ' ); $categories = get_categories(); if ( ! empty( $categories ) ) { foreach ( $categories as $category ) { $cat_id = $category->term_id; $cat_name = $category->name; $options[ $cat_id ] = $cat_name; } } $wp_customize->add_setting( 'hestia_featured_posts_category', array( 'sanitize_callback' => 'hestia_sanitize_array', 'default' => apply_filters( 'hestia_featured_posts_category_default', 0 ), ) ); $wp_customize->add_control( 'hestia_featured_posts_category', array( 'type' => 'select', 'section' => 'hestia_blog_layout', 'label' => esc_html__( 'Featured Posts', 'hestia' ), 'choices' => $options, 'priority' => 10, ) ); } add_action( 'customize_register', 'hestia_blog_settings_lite_customize_register' );