add_panel( 'home_main_panel', array( 'priority' => 4, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'Home Main Page Settings', 'abcblog' ), ) ); $wp_customize->add_section( 'home_main_top_section' , array( 'title' => esc_html__( 'Top Section', 'abcblog' ), 'priority' => 1, 'panel' => 'home_main_panel' ) ); $wp_customize->add_setting('show_main_top', array( 'default' => 'yes', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'show_main_top', array( 'settings' => 'show_main_top', 'label' => esc_html__( 'Display Top Section?', 'abcblog' ), 'section' => 'home_main_top_section', 'type' => 'select', 'priority' => 1, 'choices' => array( 'yes' => 'Yes', 'no' => 'No', ), )); $wp_customize->add_setting('main_top_title', array( 'default' => 'Featured Post', 'sanitize_callback' => 'abcblog_sanitize_text', )); $wp_customize->add_control( 'main_top_title', array( 'settings' => 'main_top_title', 'label' => esc_html__('Top Section Title', 'abcblog'), 'section' => 'home_main_top_section', 'type' => 'text', 'priority' => 2, )); $wp_customize->add_setting( 'home_main_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_main_post_category', array( 'label' => esc_html__( "Home Top Post Category", 'abcblog' ), 'description' => esc_html__( 'Select category for Top Featured Section.', 'abcblog' ), 'settings' => 'home_main_post_category', 'section' => 'home_main_top_section', 'priority' => 3, ) ) ); $wp_customize->add_setting('home_main_post_no', array( 'default' => '6', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'home_main_post_no', array( 'settings' => 'home_main_post_no', 'label' => esc_html__( 'Number Of Post to Show', 'abcblog' ), 'section' => 'home_main_top_section', 'priority' => 4, 'type' => 'select', 'choices' => array( '6' => '6', '12' => '12', '18' => '18', ), )); $wp_customize->add_section( 'home_main_mid_section' , array( 'title' => esc_html__( 'Newsletter Section', 'abcblog' ), 'priority' => 2, 'panel' => 'home_main_panel' ) ); $wp_customize->add_setting('show_main_mid', array( 'default' => 'yes', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'show_main_mid', array( 'settings' => 'show_main_mid', 'label' => esc_html__( 'Display Newsletter Section?', 'abcblog' ), 'section' => 'home_main_mid_section', 'type' => 'select', 'priority' => 1, 'choices' => array( 'yes' => 'Yes', 'no' => 'No', ), )); $wp_customize->add_setting('nl_box_title', array( 'default' => 'SIGN UP WITH OUR MAILING LIST', 'sanitize_callback' => 'abcblog_sanitize_text', )); $wp_customize->add_control( 'nl_box_title', array( 'settings' => 'nl_box_title', 'label' => esc_html__('Newsletter Box Title', 'abcblog'), 'section' => 'home_main_mid_section', 'type' => 'textarea', 'priority' => 2, )); $wp_customize->add_setting('nl_box_subtitle', array( 'sanitize_callback' => 'abcblog_sanitize_text', )); $wp_customize->add_control( 'nl_box_subtitle', array( 'settings' => 'nl_box_subtitle', 'label' => esc_html__('Newsletter Box Sub Title', 'abcblog'), 'section' => 'home_main_mid_section', 'type' => 'textarea', 'priority' => 3, )); $wp_customize->add_setting('nl_box_form_code', array( 'sanitize_callback' => 'abcblog_sanitize_text', )); $wp_customize->add_control( 'nl_box_form_code', array( 'settings' => 'nl_box_form_code', 'label' => esc_html__('Form Shortcode', 'abcblog'), 'description' => esc_html__('Enter form shortcode here, in our theme we used Mailchimp for WP plugin shortcode, but you can use any plugin shotcode.', 'abcblog'), 'section' => 'home_main_mid_section', 'type' => 'textarea', 'priority' => 4, )); $wp_customize->add_section( 'home_main_bottom_section' , array( 'title' => esc_html__( 'Bottom Section', 'abcblog' ), 'priority' => 3, 'panel' => 'home_main_panel' ) ); $wp_customize->add_setting('show_main_bottom', array( 'default' => 'yes', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'show_main_bottom', array( 'settings' => 'show_main_bottom', 'label' => esc_html__( 'Display Bottom Section?', 'abcblog' ), 'section' => 'home_main_bottom_section', 'type' => 'select', 'priority' => 1, 'choices' => array( 'yes' => 'Yes', 'no' => 'No', ), )); $wp_customize->add_setting( 'home_main_bottom_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_main_bottom_post_category', array( 'label' => esc_html__( "Home Main Bottom Post Category", 'abcblog' ), 'description' => esc_html__( 'Select category for home main bottom post, if you want to show post from all categories just leave blank.', 'abcblog' ), 'settings' => 'home_main_bottom_post_category', 'section' => 'home_main_bottom_section', 'priority' => 2, ) ) ); $wp_customize->add_setting('homemain_bottom_post_no', array( 'default' => '5', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'homemain_bottom_post_no', array( 'settings' => 'homemain_bottom_post_no', 'label' => esc_html__( 'Number Of Post to Show', 'abcblog' ), 'section' => 'home_main_bottom_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', ), )); $wp_customize->add_setting( 'home_main_bottom_eclupost_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_main_bottom_eclupost_category', array( 'label' => esc_html__( "Exclude Category", 'abcblog' ), 'description' => esc_html__( 'Select Category which you do not want to show on bottom post area, for example category showing on top section.', 'abcblog' ), 'settings' => 'home_main_bottom_eclupost_category', 'section' => 'home_main_bottom_section', 'priority' => 4, ) ) ); $wp_customize->add_setting('h_bottom_layout', array( 'default' => 'stand_view', 'sanitize_callback' => '__return_false_value', ) ); $wp_customize->add_control('h_bottom_layout', array( 'type' => 'radio', 'priority' => 5, 'label' => esc_html__( 'Bottom Post Layout', 'abcblog' ), 'section' => 'home_main_bottom_section', 'choices' => array( 'grid_view' => esc_html__( 'Grid View', 'abcblog' ), 'stand_view' => esc_html__( 'Standard View', 'abcblog' ) ) ) ); } add_action( 'customize_register', 'abcblog_home_main_settings_register' );