query_posts和post thumbnail

时间:2010-08-05 01:45:54

标签: php wordpress wordpress-theming

这是我的代码:

    $data = array('cat' => '3');
    $sliderData = query_posts($data);

但我也使用自定义字段,并发布缩略图,我该如何获取?

1 个答案:

答案 0 :(得分:1)

解决:

       $url = get_post_custom_values("url", $slider->ID);
       $thumb = get_the_post_thumbnail($slider->ID,"large");