adding "number of slides at once" option
This commit is contained in:
parent
e9cd3e8f7e
commit
f74ac9a879
|
@ -38,10 +38,10 @@
|
|||
jQuery(document).ready(function() {
|
||||
var owl = jQuery('.owl-carousel');
|
||||
owl.owlCarousel({
|
||||
items:1,
|
||||
loop:<?php echo get_theme_mod( 'understrap_theme_slider_loop_setting' );?>,
|
||||
items:<?php echo get_theme_mod( 'understrap_theme_slider_count_setting', 1 );?>,
|
||||
loop:<?php echo get_theme_mod( 'understrap_theme_slider_loop_setting', true );?>,
|
||||
autoplay:true,
|
||||
autoplayTimeout:<?php echo get_theme_mod( 'understrap_theme_slider_time_setting' );?>,
|
||||
autoplayTimeout:<?php echo get_theme_mod( 'understrap_theme_slider_time_setting', 5000 );?>,
|
||||
animateOut: 'fadeOut',
|
||||
animateIn: 'fadeIn',
|
||||
nav: false,
|
||||
|
|
|
@ -24,6 +24,17 @@ function understrap_theme_customize_register( $wp_customize ) {
|
|||
'title' => __( 'Slider Settings', 'understrap' )
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'understrap_theme_slider_count_setting', array(
|
||||
'default' => '1'
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'understrap_theme_slider_count', array(
|
||||
'label' => __( 'Number of slides displaying at once', 'understrap' ),
|
||||
'section' => 'understrap_theme_slider_options',
|
||||
'type' => 'text',
|
||||
'settings' => 'understrap_theme_slider_count_setting'
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'understrap_theme_slider_time_setting', array(
|
||||
'default' => '5000'
|
||||
) );
|
||||
|
|
Reference in New Issue