How to make slide image clickable - kary4/divituts GitHub Wiki

  1. For Divi sliders: Open up footer.php file and right after <?php wp_footer(); ?> add this code

<script>

jQuery( document ).ready(function() {

jQuery('.et_pb_slide').each(function () {

  var getURL = jQuery(this).find('.et_pb_more_button').attr('href');
  var theURL = '<a href=' + getURL + '></a>';
  var getSlideImage = jQuery(this).find('.et_pb_slide_image img');
  jQuery(getSlideImage).wrap(theURL);

});

}); 

</script>

Then add the following code to the Custom CSS field under wp admin>theme options>general settings: [quote] .et_pb_slide:first-child .et_pb_slide_image img { opacity: 1; } [/quote] Let me know the result.

If you use background image instead of slide image then you can check a solution here: https://www.elegantthemes.com/forum/viewtopic.php?f=187&t=622635&p=3432635#p3432635

  1. Fox Extra Post Slider add this code instead:
<script>

jQuery( document ).ready(function() {
jQuery('.featured-posts-slider-module article').each(function () {

var getURL = jQuery(this).find('h3 a').attr('href');
var theURL = '<a href=' + getURL + '></a>';
jQuery(this).wrap(theURL);

});

}); 

</script>
⚠️ **GitHub.com Fallback** ⚠️