selective_refresh ) ? 'postMessage' : 'refresh'; $wp_customize->add_panel( 'automotive_services_post', array( 'priority' => 31, 'title' => esc_html__( 'Post Option', 'automotive-services' ), ) ); /*========================================= Archive Post Section =========================================*/ $wp_customize->add_section( 'automotive_services_archive_post_setting', array( 'title' => esc_html__( 'Archive Post', 'automotive-services' ), 'priority' => 1, 'panel' => 'automotive_services_post', ) ); // Layouts Post $wp_customize->add_setting('automotive_services_blog_layout_option_setting',array( 'default' => 'Default', 'sanitize_callback' => 'automotive_services_sanitize_choices' )); $wp_customize->add_control(new Automotive_Services_Image_Radio_Control($wp_customize, 'automotive_services_blog_layout_option_setting', array( 'type' => 'select', 'label' => __('Blog Post Layouts','automotive-services'), 'section' => 'automotive_services_archive_post_setting', 'choices' => array( 'Default' => esc_url(get_template_directory_uri()).'/assets/images/layout-1.png', 'Left' => esc_url(get_template_directory_uri()).'/assets/images/layout-2.png', 'Right' => esc_url(get_template_directory_uri()).'/assets/images/layout-3.png', )))); // Post Heading Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_post_heading_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_post_heading_settings', array( 'label' => esc_html__( 'Hide / Show Post Heading', 'automotive-services' ), 'section' => 'automotive_services_archive_post_setting', 'settings' => 'automotive_services_post_heading_settings', 'type' => 'checkbox' ) ); // Post Content Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_post_content_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_post_content_settings', array( 'label' => esc_html__( 'Hide / Show Post Content', 'automotive-services' ), 'section' => 'automotive_services_archive_post_setting', 'settings' => 'automotive_services_post_content_settings', 'type' => 'checkbox' ) ); // Post Featured Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_post_featured_image_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_post_featured_image_settings', array( 'label' => esc_html__( 'Hide / Show Post Feature Image', 'automotive-services' ), 'section' => 'automotive_services_archive_post_setting', 'settings' => 'automotive_services_post_featured_image_settings', 'type' => 'checkbox' ) ); // Post Date Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_post_date_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_post_date_settings', array( 'label' => esc_html__( 'Hide / Show Post Date', 'automotive-services' ), 'section' => 'automotive_services_archive_post_setting', 'settings' => 'automotive_services_post_date_settings', 'type' => 'checkbox' ) ); // Post Date Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_post_comments_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_post_comments_settings', array( 'label' => esc_html__( 'Hide / Show Post Comment', 'automotive-services' ), 'section' => 'automotive_services_archive_post_setting', 'settings' => 'automotive_services_post_comments_settings', 'type' => 'checkbox' ) ); // Post Date Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_post_author_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_post_author_settings', array( 'label' => esc_html__( 'Hide / Show Post Author', 'automotive-services' ), 'section' => 'automotive_services_archive_post_setting', 'settings' => 'automotive_services_post_author_settings', 'type' => 'checkbox' ) ); // Post Tags Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_post_tags_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_post_tags_settings', array( 'label' => esc_html__( 'Hide / Show Post Tags', 'automotive-services' ), 'section' => 'automotive_services_archive_post_setting', 'settings' => 'automotive_services_post_tags_settings', 'type' => 'checkbox' ) ); /*========================================= Single Post Section =========================================*/ $wp_customize->add_section( 'automotive_services_single_post', array( 'title' => esc_html__( 'Single Post', 'automotive-services' ), 'priority' => 3, 'panel' => 'automotive_services_post', ) ); // Post Heading Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_single_post_heading_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_single_post_heading_settings', array( 'label' => esc_html__( 'Hide / Show Post Heading', 'automotive-services' ), 'section' => 'automotive_services_single_post', 'settings' => 'automotive_services_single_post_heading_settings', 'type' => 'checkbox' ) ); // Post Content Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_single_post_content_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_single_post_content_settings', array( 'label' => esc_html__( 'Hide / Show Post Content', 'automotive-services' ), 'section' => 'automotive_services_single_post', 'settings' => 'automotive_services_single_post_content_settings', 'type' => 'checkbox' ) ); // Post Featured Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_single_post_featured_image_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_single_post_featured_image_settings', array( 'label' => esc_html__( 'Hide / Show Post Feature Image', 'automotive-services' ), 'section' => 'automotive_services_single_post', 'settings' => 'automotive_services_single_post_featured_image_settings', 'type' => 'checkbox' ) ); // Post Date Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_single_post_date_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_single_post_date_settings', array( 'label' => esc_html__( 'Hide / Show Post Date', 'automotive-services' ), 'section' => 'automotive_services_single_post', 'settings' => 'automotive_services_single_post_date_settings', 'type' => 'checkbox' ) ); // Post Date Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_single_post_comments_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_single_post_comments_settings', array( 'label' => esc_html__( 'Hide / Show Post Comment', 'automotive-services' ), 'section' => 'automotive_services_single_post', 'settings' => 'automotive_services_single_post_comments_settings', 'type' => 'checkbox' ) ); // Post Date Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_single_post_author_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_single_post_author_settings', array( 'label' => esc_html__( 'Hide / Show Post Author', 'automotive-services' ), 'section' => 'automotive_services_single_post', 'settings' => 'automotive_services_single_post_author_settings', 'type' => 'checkbox' ) ); // Post Tags Hide/ Show Setting // $wp_customize->add_setting( 'automotive_services_single_post_tags_settings' , array( 'default' => '1', 'sanitize_callback' => 'automotive_services_sanitize_checkbox', 'capability' => 'edit_theme_options', 'priority' => 2, ) ); $wp_customize->add_control( 'automotive_services_single_post_tags_settings', array( 'label' => esc_html__( 'Hide / Show Post Tags', 'automotive-services' ), 'section' => 'automotive_services_single_post', 'settings' => 'automotive_services_single_post_tags_settings', 'type' => 'checkbox' ) ); } add_action( 'customize_register', 'automotive_services_post_setting' );