使用导航将Wordpress Gallery简码转换为滑块

问题描述

我创建了一个定制器功能,可以在其中添加图库。完美运作。但是现在我想增强它-由于用户向图库添加了大约30张图像,因此我想将其保留为一个不错的滑块。这是代码

function featured_image_gallery_customize_register( $wp_customize ) {
 
    if ( ! class_exists( 'CustomizeImagegalleryControl\Control' ) ) {
        return;
    }
    $wp_customize->add_setting( 'featured_image_gallery',array(
        'default' => array(),'sanitize_callback' => 'wp_parse_id_list',) );
    $wp_customize->add_control( new CustomizeImagegalleryControl\Control(
        $wp_customize,'featured_image_gallery',array(
            'label'    => __( 'Image gallery Field Label' ),'section'  => 'footer_settings','settings' => 'featured_image_gallery','type'     => 'image_gallery',)
    ) );
}
add_action( 'customize_register','featured_image_gallery_customize_register' );

function the_featured_image_gallery( $atts = array() ) {
    $setting_id = 'featured_image_gallery';
    $ids_array = get_theme_mod( $setting_id );
    if ( is_array( $ids_array ) && ! empty( $ids_array ) ) {
        $atts['ids'] = implode( ',',$ids_array );
        $atts['size'] = 'medium';
        $atts['link'] = 'none';
        $atts['columns'] = '6';
        echo gallery_shortcode( $atts );
    }
}

虽然6列很好,但我想具有自动播放功能和导航箭头。没有插件怎么办?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)