Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 查询文章和文章缩略图_Php_Wordpress_Wordpress Theming - Fatal编程技术网

Php 查询文章和文章缩略图

Php 查询文章和文章缩略图,php,wordpress,wordpress-theming,Php,Wordpress,Wordpress Theming,这是我的密码: $data = array('cat' => '3'); $sliderData = query_posts($data); 但我也使用自定义字段和post缩略图,如何才能获得这些内容?解决: $url = get_post_custom_values("url", $slider->ID); $thumb = get_the_post_thumbnail($slider->ID,"large"); 您是如何将这些

这是我的密码:

    $data = array('cat' => '3');
    $sliderData = query_posts($data);
但我也使用自定义字段和post缩略图,如何才能获得这些内容?

解决:

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

您是如何将这些变量合并到查询调用中的?