Reputation: 6601
I am using the Nictitate theme my WordPress website.
The theme includes a client widget that simply displays client logos. I noticed that FlexSlider is being used on other widgets within the theme and so added some code to get the client logos in a carousel.
However, I cannot get this working properly. All the logos are grouped together in the first slide and then all disappear.
Can anyone help?
I have added the following code to 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>
In 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');
}
});
});
Upvotes: 0
Views: 689
Reputation: 2245
in http://leanneoleary.com/traincoachexcel.co.uk/wp-content/themes/nictitate-1.1.4/style.css line 1084
Remove this
.kopa-client-widget ul { width:1100px !important;}
After doing that, this is what I get:
Upvotes: 1