dongxie548548 2019-06-24 12:53
浏览 62

如何将“悬停滑块”集成到自定义wordpress主题?

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 CSS实现渐隐虚线边框
    • ¥15 thinkphp6配合social login单点登录问题
    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题