I prepared an "On hover slider"(https://hovslide.digitalsolutioner.com/, it's the second made with JS) that I want to integrate into a custom Wordpress theme.
I have some difficulties to adapt to the slider, I would have the first five images of content showed in the slide. I think I have to modify the arrays(color1, color2, color3, color4, color5) in a generic way compatible with Wordpress.
<!-- from front-page.php -->
<div class="row">
<?php
}
?>
<div class="col-md-4 px-0">
<div class="container container-content">
<a href="<?php the_permalink(); ?>" class="card mx-2 mb-6">
<?php the_post_thumbnail('antonellotrio_single', array( 'id' => 'firstImg', 'class' => 'card-img-top img-fluid align-middle animated fadeIn duration-3s delay-2s', 'alt' => get_the_title() ))?>
<div class="card-body">
<h2 class="card-title px-6"><?php the_title(); ?></h2>
</div>
</a>
</div>
</div>
<!-- increment the loop BEFORE we test the variable -->
<?php $i++;
if($i != 0 && $i % 3 == 0) { ?>
</div>
My goal is a Wordpress site with a hover slider in a home like this example: https://www.defactoinc.com/styling/jessica-bobince/overview
Thanks for the help, if you need other codes or clarifications I'm available!
Best! Carlo