remove_section("colors"); เอาบรรทัดนี้ของ Seed ออก*/ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; /** * Kirki theme customizer */ if ( !class_exists('Kirki') ) { return; } Kirki::add_config( 'aptnews_config', array( 'capability' => 'edit_theme_options', 'option_type' => 'theme_mod', ) ); Kirki::add_section( 'header_section', array( 'title' => __( 'Customize Header', 'apt-news' ), 'description' => __( '', 'apt-news' ), 'panel' => '', // Not typically needed. 'priority' => 160, 'capability' => 'edit_theme_options', 'theme_supports' => '', // Rarely needed. ) ); Kirki::add_field( 'aptnews_config', array( 'settings' => 'headbar_show_demo', 'label' => __( 'Show Default Header. If you want to customize header, turn it "off" and add "prebuild layout" in "Headbar" widget area. If you turn it "on", "Headbar" widget area won\'t work', 'apt-news' ), 'section' => 'header_section', 'type' => 'switch', 'priority' => 10, 'default' => '1', 'choices' => array( 'on' => esc_attr__( 'ON', 'apt-news' ), 'off' => esc_attr__( 'OFF', 'apt-news' ) ) ) ); } add_action( 'customize_register', 'aptnews_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function aptnews_customize_preview_js() { wp_enqueue_script( 'aptnews_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'aptnews_customize_preview_js' ); function apt_kirki_customizer() { } add_action('after_setup_theme', 'apt_kirki_customizer');