单打。php主题模板文件,我正在显示帖子的附件列表。
global $post;
$args = array(
\'post_type\' => \'attachment\',
\'numberposts\' => null,
\'post_status\' => null,
\'post_parent\' => $o_ID
);
$attachments = get_posts($args);
if ($attachments) {
echo \'<ul class="slideshow-controller">\';
foreach ($attachments as $attachment) {
//echo apply_filters(\'the_title\', $attachment->post_title);
echo \'<li>\';
echo wp_get_attachment_link($attachment->ID, \'thumbnail\', 0, 0, \'Download\');
echo wp_get_attachment_image($attachment->ID, \'thumbnail\',false);
echo \'</li>\';
}
echo \'</ul>\';
}
奇怪,
wp_get_attachment_link
正常工作(回显附件的媒体链接),
wp_get_attachment_image
没有:它根本没有回声。
我做错了什么?