Tagged: featured slider
- This topic has 5 replies, 2 voices, and was last updated 7 years, 9 months ago by Pratik.
-
AuthorPosts
-
February 16, 2017 at 1:04 pm #109924shahid864Participant
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!
February 16, 2017 at 2:32 pm #109943PratikParticipantHi @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' );
February 16, 2017 at 5:01 pm #109969shahid864Participantwhat is the best way i can call that in featured slider area with first button ?
February 16, 2017 at 5:12 pm #109970PratikParticipantFebruary 16, 2017 at 5:23 pm #109974shahid864Participanti 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
February 17, 2017 at 9:38 am #110042PratikParticipantHi @shahid864,
For that, you will need to do some custom work. Please hire a customizer for that custom work.
Regards,
Pratik -
AuthorPosts
- The topic ‘Add the new field in customizer featured slider’ is closed to new replies.