Help with Flexslider thumbnail control


#1

I tried activating the thumbnail control on my theme with flexslider support. However when doing this there are placeholders for the thumbs but the img src=“undefined” .

http://flex.madebymufffin.com/examples/thumbnail-controlnav.html

I guess you have to asign the dzta thumb aswell, but how would you go about to do this? :slight_smile:
Does anyone know what the fix for this is? I’ve seen a couple of themes using the thumb control feature so i guess it should be possible… Thanks!

Kind regards


#2

Have you followed the HTML format on that demo page?

It is not easy to know your issue if you do not post your demo URL here…


#3

Problem is how would you dynamicly add markup for the thumbnails in WordPress? :slight_smile:


#4
playnethemes said

Problem is how would you dynamicly add markup for the thumbnails in WordPress? :slight_smile:

I still do not understand what is your issue actually.

<!-- Place somewhere in the <body> of your page -->
<div class="flexslider">
  <ul class="slides">
    <li data-thumb="slide1-thumb.jpg">
      <img src="slide1.jpg" />
    </li>
    <li data-thumb="slide2-thumb.jpg">
      <img src="slide2.jpg" />
    </li>
    <li data-thumb="slide3-thumb.jpg">
      <img src="slide3.jpg" />
    </li>
    <li data-thumb="slide4-thumb.jpg">
      <img src="slide4.jpg" />
    </li>
  </ul>
</div>

You only need to call your function to replace the image URLs above, for both slide$-thumb.jpg and slide$.jpg


#5

Hmm i see now how I should incorporate it into the code I have in my php file! :slight_smile: I’ll let you know if i get it to work!

EDIT:

Turns out I just had to add:

<?php echo ( wp_get_attachment_url( $single_gallery_attachment->ID, 'thumbnail' )); ?>
as data-thumb= to my script! :slight_smile:

Thanks for your help agusmu! :wink: