Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #109924
    shahid864
    Participant

    Hello,

    I want to add more fields in featured slider area in customizer , but if we update the theme then we will lost that fields/modification , how and best solution will be to move in the child theme? (like this in current parent theme http://prntscr.com/e9d4rz ) so we can use that after theme update. thanks!

    #109943
    Pratik
    Participant

    Hi @shahid864,

    In your child theme , create a function to add just that link and hook it to customize_register hook. E.g:

    
    function clean_business_add_slider_link_2( $wp_customize ){
        $featured_slider_number = apply_filters( 'clean_business_get_option', 'featured_slider_number' );
    
        //loop for featured post sliders
        $priority   =   '11';
        for ( $i=1; $i <=  $featured_slider_number ; $i++ ) {
            $wp_customize->add_setting( 'featured_link_2_'. $i, array(
                'capability'        => 'edit_theme_options',
                'sanitize_callback' => 'esc_url_raw',
            ) );
    
            $wp_customize->add_control(  'featured_link_2_'. $i, array(
    			'active_callback' => 'clean_business_is_image_slider_active',
    			'label'           => esc_html__( 'Link 2', 'clean-business-pro' ),
    			'priority'        => $priority . '.' .$i . $i  . $i,
    			'section'         => 'clean_business_featured_slider',
    			'settings'        => 'featured_link_2_'. $i,
            ) );
        }
    }
    add_action( 'customize_register', 'clean_business_add_slider_link_2' );
    
    #109969
    shahid864
    Participant

    what is the best way i can call that in featured slider area with first button ?

    #109970
    Pratik
    Participant

    Hi @shahid864,

    I cannot understand what you mean. Can you explain a bit more?

    Regards,
    Pratik

    #109974
    shahid864
    Participant

    i want to show the save value from child theme in slider area like this (http://prntscr.com/e9fwbu), how i can call that from child theme

    #110042
    Pratik
    Participant

    Hi @shahid864,

    For that, you will need to do some custom work. Please hire a customizer for that custom work.

    Regards,
    Pratik

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Add the new field in customizer featured slider’ is closed to new replies.