dongzhi5386 2014-11-14 12:50
浏览 9

单击帖子缩略图时打开影像库图库?

It's on this page: http://www.demo.segermo.com/anlaggning/referenser-test/

Right now it's showing multiple post-thumbnails that are linked to open up a shadowbox gallery. But i only want to show one thumbnail, but still have the foreach loop run through all the attached images from the get_multi_images_src function..

See the loop i've got so far. How can i solve this problem? I know I have to get the post_thumbnail out of the loop, but i can't get it to work..

<?php global $shadowlink; ?>

<?php foreach(get_multi_images_src( 'thumbnail', 'large' ) as $k => $u){
$shadowlink = $u[1][0];
echo '<a rel="shadowbox[gallery1]" href="' . $shadowlink . '">';
the_post_thumbnail('insta-size', array( 'class' => "zoomer-class attachment-post-thumbnail"));
echo '</a>';
} ?>    
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本