Home Forums Add-ons Gallery Field Slider captions with links


Slider captions with links

  • Hi

    I am going crazy over this. I am fairly new to WordPress and am trying to add it as a CMS to a site I built. Everything is working except for one thing and I can’t seem to get it to work.

    I have got a Cycle2 slideshow on my homepage and have used an ACF Gallery to add my images. I have also got a slide counter and a caption with each image. What I want to do is have my captions link to individual posts and I cannot figure out how to do this.

    I would be more than grateful for any hint!! as I am loosing my mind over this…

    Thank you!!

    This is my code:

    <?php get_header() ?>
    $images = get_field('image_gallery');
    if( $images ): ?>
    <div class="slideshowwrapper">
    	<div class="cycle-slideshow" 
    		    data-cycle-caption-template=" {{title}} {{alt}} {{slideNum}} / {{slideCount}} ">
    		<div class="cycle-prev"></div>
    		<div class="cycle-next"></div>
            	<?php foreach( $images as $image ): ?>
                 	<img src="<?php echo $image['sizes']['large']; ?>" title="<?php echo $image['title']; ?>"/>
            	<?php endforeach; ?>
    <?php endif; ?>
    <!-- empty element for caption -->
    <div id="title-caption" class="imagenumber"></div>
    	<!-- end of container div -->
    	<?php get_footer() ?>
  • it’s resolved – i finally got it to work!!!

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Slider captions with links’ is closed to new replies.