Warning: Attempt to read property "queue" on null in /www/wwwroot/liuronghuan.com/wp-includes/script-loader.php on line 2678

Warning: foreach() argument must be of type array|object, null given in /www/wwwroot/liuronghuan.com/wp-includes/script-loader.php on line 2678

wordpress输出缩略图原图地址

  Wordpress          3,680 阅读          2016-03-18

在制作主题的时候可能需要第一篇文章显示大图,后面的几个文章显示缩略图,那么怎么获得第一篇问斩的原图片地址呢?

$img_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "Full");
echo $img_src[0];

 

支付宝二维码
微信二维码

扫码打赏,您说多少就多少!

感谢您的打赏,我们会更加努力的更新站点!

发表评论


Warning: Undefined variable $user_ID in /www/wwwroot/liuronghuan.com/wp-content/themes/Ini/comments.php on line 4