Skip to content

Instantly share code, notes, and snippets.

@mjesusabarca
Created August 10, 2017 16:18
Show Gist options
  • Select an option

  • Save mjesusabarca/1ab477d2896be9eed0d18e6e0669dac4 to your computer and use it in GitHub Desktop.

Select an option

Save mjesusabarca/1ab477d2896be9eed0d18e6e0669dac4 to your computer and use it in GitHub Desktop.
delete slider section
// Slider Section
$wp_customize->add_section( 'slider_options', array(
'title' => __('Slider Options', 'milestone-lite'),
'priority' => null,
'description' => __('Featured Image Size Should be ( 1400x600 ).','milestone-lite'),
));
$wp_customize->add_setting('slide-page7',array(
'default' => '0',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'absint'
));
$wp_customize->add_control('slide-page7',array(
'type' => 'dropdown-pages',
'label' => __('Select page for slide one:','milestone-lite'),
'section' => 'slider_options'
));
$wp_customize->add_setting('slide-page8',array(
'default' => '0',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'absint'
));
$wp_customize->add_control('slide-page8',array(
'type' => 'dropdown-pages',
'label' => __('Select page for slide two:','milestone-lite'),
'section' => 'slider_options'
));
$wp_customize->add_setting('slide-page9',array(
'default' => '0',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'absint'
));
$wp_customize->add_control('slide-page9',array(
'type' => 'dropdown-pages',
'label' => __('Select page for slide three:','milestone-lite'),
'section' => 'slider_options'
)); // Slider Section
$wp_customize->add_setting('slider_readmore',array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('slider_readmore',array(
'settings' => 'slider_readmore',
'section' => 'slider_options',
'label' => __('Add text for slide read more button','milestone-lite'),
'type' => 'text'
));// Slider Read more
$wp_customize->add_setting('disabled_slides',array(
'default' => true,
'sanitize_callback' => 'milestone_lite_sanitize_checkbox',
'capability' => 'edit_theme_options',
));
$wp_customize->add_control( 'disabled_slides', array(
'settings' => 'disabled_slides',
'section' => 'slider_options',
'label' => __('Uncheck To Show This Section','milestone-lite'),
'type' => 'checkbox'
));//hide Slider Section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment