如何将超大插件与WordPress自定义帖子类型功能图像集成


How to Integrate Supersize Pluggin with WordPress Custom Post Types Feature Image

如果以下内容写错,请道歉。首次发布。提前感谢任何解决方案。

我正在尝试手动将超大插件与WordPress集成。我需要它使用我定义的自定义帖子类型(CPT),称为"主页幻灯片",并在该CPT中获取帖子的特色图像并将其拉入超大脚本中。

我的CPT"主页幻灯片"在正常循环中正常工作。代码可以在这里看到:http://pastebin.com/1KqH2asD

我让超大插件使用绝对网址在WordPress中工作。代码可以在这里看到:http://pastebin.com/jbpccWa2

我已经尝试了几个小时来结合上述内容,但尚未成功。幻灯片(方括号之间的位)需要从WordPress CPT动态生成。

任何想法将不胜感激。

谢谢戴夫

以前的研究链接:这些针对特定目录或具有我无法工作的元素。

jquery 超大小显示 IE 错误

http://wordpress.org/support/topic/custom-post-types-category_name

http://forum.jquery.com/topic/tutorial-how-to-detect-images-automatically-with-supersized

试试这段代码:

slides : [
<?php 
    //query
    query_posts(array('post_type'=>'homepageslides',
                      'posts_per_page'=>'20'
                      ));
    //loop
    if(have_posts()) : 
        while (have_posts()) : the_post();
            //feature image
            $large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
            $title = get_the_title();
            //echo slides
            echo "{image : '".$large_image_url[0]."', title : '".$title."', url : ''},";
        endwhile; 
    endif; 
?>]