0

我正在尝试将非图像链接添加到 FancyBox 画廊。我也在使用 Advanced Custom Fields Repeater 字段。

到目前为止我有这个:

    <a class="fancybox-buttons" data-fancybox-group="button" href="http://website.co.uk/wp-content/uploads/2013/08/Burnham1.jpg">
    <p>Show Plans</p>
    </a>

    <?php if( get_field('lightbox_images') ): ?>

    <?php while( has_sub_field('lightbox_images') ): ?>

    <a class="fancybox-buttons" data-fancybox-group="button" href="<?php the_sub_field('image'); ?>"></a>

    <?php endwhile; ?>

    <?php endif; ?>

我不确定非图像链接中的 href 值应该是什么才能启动图库?目前我只是对其进行了硬编码,但这应该可以在 WordPress 中进行编辑,并且使用这种方法意味着这个最初的链接会向画廊添加一个我不想要的额外重复图像。

非常欢迎所有想法。

谢谢

4

0 回答 0