我将fancybox(jquery)与多个post缩略图插件相结合。基本上,这个想法是当用户点击特色图片帖子时,它会在次要特色图片上显示该图片。这是我正在编写的代码。
     <?php query_posts(\'posts_per_page=-1&cat=10\'); if(have_posts()) : while(have_posts()) :the_post(); ?>
            <div class="collections_thumbnails">
              <a class="fancybox" href="<?php MultiPostThumbnails::get_the_post_thumbnail(get_post_type, \'secondary-image\'); ?>"><?php if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), \'large\'); echo \'<img src="\' . $large_image_url[0] . \'" title="\' . the_title_attribute(\'echo=0\') . \'">\';  } ?></a>
              <div class="hover_dress">
                <h3><a class="dress_title" href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
              </div>
            </div>
    <?php endwhile; endif; wp_reset_query();?>
 现在的问题是,每当我单击特征时,它都会在fancybox中显示特征图像,而不是次图像,并且一旦我关闭fancybox,特征图像就会消失。有没有人在用fancybox创建帖子特色图片时尝试过这种方法。
下面是输出的屏幕截图

这是在次映像中设置的屏幕截图

这是我目前正在建立的网站的链接-
http://digitalspin.ph/pluma/?page_id=8
http://i255.photobucket.com/albums/hh140/testament1234/second-image_zpsfb2bd810.jpg