FlexSlider轮播在第一张幻灯片中滑动所有图像 - WordPress

时间:2015-11-19 23:43:01

标签: javascript php jquery css wordpress

我正在使用Nictitate主题我的WordPress网站。

主题包括一个仅显示客户端徽标的客户端窗口小部件。我注意到FlexSlider正在主题中的其他小部件上使用,因此添加了一些代码以在旋转木马中获取客户端徽标。

然而,我无法正常工作。所有徽标在第一张幻灯片中组合在一起,然后全部消失。

有人可以帮忙吗?

我已将以下代码添加到widgets.php

<div class="clients-slider flexslider">
  <ul class="slides">
     <?php


    while ( $clients->have_posts() ) : $clients->the_post();

        $client_url = get_post_meta( get_the_ID(), 'client_url', true );

        $thumbnail_id = get_post_thumbnail_id();

        $thumbnail = wp_get_attachment_image_src( $thumbnail_id, 'kopa-image-size-4' );

    ?>



        <li>

                <a href="<?php echo $client_url; ?>" target="_blank"><img src="<?php echo $thumbnail[0]; ?>" alt=""></a>

        </li>



    <?php


endwhile; ?>



</ul>
</div>

custom.js

jQuery(window).load(function() {

    jQuery('.clients-slider').flexslider({

        animation: "slide",

        animationLoop: false,

        itemWidth: 50,

        itemMargin: 5,

        minItems: 2,

        maxItems: 4,

        selector: ".slides > li",

        start: function(slider) {

            jQuery('body').removeClass('loading');

        }

    });

});

1 个答案:

答案 0 :(得分:1)

http://leanneoleary.com/traincoachexcel.co.uk/wp-content/themes/nictitate-1.1.4/style.css第1084行

删除此

.kopa-client-widget ul { width:1100px !important;}

这样做之后,这就是我得到的:

enter image description here