0
我使用这里的信息http://ieg.wnet.org/2016/02/replacing-default-wordpress-gallery-shortcode/作为自定义图库简码的基础,并试图创建此传送带滑块https://www.jssor.com/demos/image-gallery.slider。问题是我不知道如何实现它。在哪里添加代码到自定义图库简码
图像和直到那时的所有东西都显示在源代码中,但之后没有任何东西。
<div data-u="slides" style="cursor:default;position:relative;top:0px;left:0px;width:800px;height:356px;overflow:hidden;">
<?php
foreach ($images as $image) {
$thumbnail = wp_get_attachment_image_src($image->ID, 'homepage-thumb');
$thumbnail = $thumbnail[0];
$fullsize = wp_get_attachment_image_src($image->ID, 'service-page');
$fullsize = $fullsize[0];
$gallery .= "<div><img data-u='image' src='".$thumbnail."'><img data-u='thumb' src='".$fullsize."'></div>";
}
return $gallery;
?>
</div>
这可能是一些简单的事情,这只是远远超过我的知识基础,当谈到这一点。
谢谢,这工作! – mwz