Tagged: featured image slider
I’ve tried running installing this code to make the featured image slider clickable to the corresponding post, but it doesn’t seem to work.
Any suggestions on how to get this to work?
nick
Hey Nick,
Please provide admin info in the private area so we can log in and look into this further.
Best regards,
Jordan Shannon
Attached is Private Information below
Hi,
Did you attempt to put the php code directly into functions.php?
Best regards,
Jordan Shannon
I did. I didn’t create a child theme cause I was just testing it out, but nothing changed.
Hi,
This should be working. You just had to update the class from the original code:
// slide link
add_action('wp_footer', 'ClickableSlide');
function ClickableSlide(){
?>
<script type="text/javascript">
(function($) {
function c() {
$('.avia-featureimage-slideshow .avia-slideshow-inner li').click( function() {
var link = $(this).find('.avia-slideshow-button').attr('href');
window.location.href = link;
});
}
c();
})(jQuery);
</script>
<?php
}
I updated the CSS as well.
Best regards,
Jordan Shannon
Works perfectly. Thanks Jordan!
Hi,
No problem at all. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon