Home › Forums › Add-ons › Gallery Field › "Slider with thumbnail slider(navigation)"
I’m trying to work with “The gallery field”.
I tried to create “Slider with thumbnail slider(navigation)”
link in this demo
http://flexslider.woothemes.com/thumbnail-slider.html
I used “The gallery field” Documentation
http://www.advancedcustomfields.com/resources/gallery/
This example shows how to display the images in the markup required for a WooThemes Flexslider to work
<?php
$images = get_field('gallery');
if( $images ): ?>
<div id="slider" class="flexslider">
<ul class="slides">
<?php foreach( $images as $image ): ?>
<?php endforeach; ?>
</div>
<div id="carousel" class="flexslider">
<ul class="slides">
<?php foreach( $images as $image ): ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
and this java script:
$(window).load(function() {
// The slider being synced must be initialized first
$('#carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 210,
itemMargin: 5,
asNavFor: '#slider'
});
$('#slider').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
sync: "#carousel"
});
});
But I have a problem just Carousel (thumbnail slider navigation) slider Works.
How do I solve it?
Thanks
Hi there,
Could you please check the JS Console for any error messages on the page? Also, could you please use the code tag for your code?
Thanks!
Hi Gabi,
It means there is a conflict between Flexslider and your theme. It can be how you include the script. You can check the JS console on Google Chrome to check the error. For something like this, please ask Flexslider support and provide them with the error messages.
I hope this helps.
Hi James,
Sorry to jump on someone elses topic but I am also having the same issue, after some testing I found out the slider carousel works fine with static HTML however when I introduce the ACF foreach loop it doesn’t like it, I checked firebug but I have no javascript errors.
Regards
Graham
Hi @gab1982
Could you please share the static HTML code and the PHP code where you used ACF? Also, could you please share it in a new thread as this thread has a formatting issue that makes it looks broken.
Thanks!
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.