Created
April 21, 2015 05:18
-
-
Save luxiaojian/cf3f4a76a2b2d3376f6c to your computer and use it in GitHub Desktop.
wordpress前端调用文章缩略图
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$thumb_id = get_post_thumbnail_id(); | |
$thumb_url = wp_get_attachment_image_src($thumb_id,'thumbnail-size', true);//thumbnail-size:thumbnail,medium,large,full | |
echo $thumb_url[0]; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment