add_section( 'homepage_related_post_Section', array( 'title' => esc_html__( 'Related Post Settings', 'always' ), 'capability' => 'edit_theme_options', 'panel' => 'homepage_option_panel', ) ); $wp_customize->add_setting('ed_related_post', array( 'default' => $always_default['ed_related_post'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'always_sanitize_checkbox', ) ); $wp_customize->add_control('ed_related_post', array( 'label' => esc_html__('Enable Related Posts', 'always'), 'section' => 'homepage_related_post_Section', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'always_related_post_cat', array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'always_sanitize_select', ) ); $wp_customize->add_control( 'always_related_post_cat', array( 'label' => esc_html__( 'Related Post Category', 'always' ), 'section' => 'homepage_related_post_Section', 'type' => 'select', 'choices' => $always_post_category_list, ) ); $wp_customize->add_setting('homepage_relate_post_button_text', array( 'default' => $always_default['homepage_relate_post_button_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control('homepage_relate_post_button_text', array( 'label' => esc_html__('Related Post Button Text', 'always'), 'description' => esc_html__('Removing text will disable read more on the related post', 'always'), 'section' => 'homepage_related_post_Section', 'type' => 'text', ) ); $wp_customize->add_setting('homepage_relate_post_button_text_url', array( 'default' => $always_default['homepage_relate_post_button_text_url'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control('homepage_relate_post_button_text_url', array( 'label' => esc_html__('Related Post Button URL', 'always'), 'section' => 'homepage_related_post_Section', 'type' => 'text', ) );