Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #619777

    Hi there!

    I’m having problems trying to link images to pages every time I set a caption to any image in the slider.

    If I get rid of the caption, the link is there and it works but when I put it back the link stays behind the caption div and it is not clickable anymore.

    Any idea about how to solve this?

    Thanks in advance!

    #621167

    Ping? O_o

    #622970

    Hi!

    Thank you for using Enfold.

    Are you going to add different links for each slide? For a temporary fix, please add this in the functions.php file:

    // slide link
    add_action('wp_footer', 'ava_new_custom_script_slidelink');
    function ava_new_custom_script_slidelink(){
    ?>
    <script type="text/javascript">
    (function($) { 
        var link = '';
    
         $('.avia-slideshow').click(function(e) {
            	var exclude = $(e.target).is('.prev-slide, .next-slide');
    
            	if(exclude){
    				e.preventDefault();
    				return;
            	}
    
            	var inner = $(this).find('.avia-slideshow-inner'),
                	link  = inner.find('.active-slide .avia-slide-wrap').attr('href');
    
                window.location.href = link;
        });
    
        $('.avia-slideshow').on('mouseover', function() {
            var inner = $(this).find('.avia-slideshow-inner'),
                link  = inner.find('li .avia-slide-wrap');
    
                if(link.length) $(this).css('cursor', 'pointer');
        });
    })(jQuery);
    
    </script>
    <?php
    }

    Cheers!
    Ismael

    #629626

    Hi!

    We updated the code a bit. Please make that you copy the code directly from this forum, not from your email.

    Cheers!
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.