add_section( 'home_page_section' , array( 'title' => esc_html__( 'Home Standard Page Settings', 'abcblog' ), 'priority' => 5, 'description' => esc_html__('Homepage Element Control', 'abcblog'), ) ); $wp_customize->add_setting('home_page_layout', array( 'default' => 'with-sidebar', 'sanitize_callback' => '__return_false_value', 'transport' => 'postMessage' )); $wp_customize->add_control( 'home_page_layout', array( 'settings' => 'home_page_layout', 'label' => esc_html__( 'Choose Homepage Layout', 'abcblog' ), 'section' => 'home_page_section', 'type' => 'select', 'priority' => 1, 'choices' => array( 'with-sidebar' => esc_html__( 'Three Column', 'abcblog' ), 'full-width' => esc_html__( 'Full Width', 'abcblog' ), ), )); $wp_customize->add_setting( 'home_post_category', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => '__return_false_value' ) ); $wp_customize->add_control( new abcblog_Post_Category_Control( $wp_customize, 'home_post_category', array( 'label' => esc_html__( "Homepage Post Category", 'abcblog' ), 'description' => esc_html__( 'Select category for home lastest post, if you want to show post from all categories just leave blank.', 'abcblog' ), 'settings' => 'home_post_category', 'section' => 'home_page_section', 'priority' => 2, ) ) ); $wp_customize->add_setting('home_post_no', array( 'default' => '10', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'home_post_no', array( 'settings' => 'home_post_no', 'label' => esc_html__( 'Number Of Post to Show', 'abcblog' ), 'section' => 'home_page_section', 'priority' => 3, 'type' => 'select', 'choices' => array( '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18', '19' => '19', '20' => '20', '25' => '25', '30' => '30', '35' => '35', '40' => '40', ), )); $wp_customize->add_setting( 'home_post_exclude_category', array( 'default' => '9999999', 'capability' => 'edit_theme_options', 'sanitize_callback' => '__return_false_value' ) ); $wp_customize->add_control( new abcblog_Post_Category_Control( $wp_customize, 'home_post_exclude_category', array( 'label' => esc_html__( "Exclude Category", 'abcblog' ), 'description' => esc_html__( 'Select Category which you do not want to show on latest post area, for example category showing on slider.', 'abcblog' ), 'settings' => 'home_post_exclude_category', 'section' => 'home_page_section', 'priority' => 4, ) ) ); } add_action( 'customize_register', 'abcblog_home_settings_register' );