更新时间:2023-11-30 14:21:28
您需要检索图片资源,然后获取图片网址
You need to retrieve the image resource, then get the image url
$_image = $_post->getFeaturedImage();
echo $_image->getAvailableImage();
看看Fishpig/Wordpress/Model/Image.php
了解更多的url方法:
Take a look at Fishpig/Wordpress/Model/Image.php
for more url methods:
public function getThumbnailImage()
public function getMediumImage()
public function getLargeImage()
public function getFullSizeImage()
public function getPostThumbnailImage()
public function getAvailableImage()
public function getImageByType($type = 'thumbnail')