php 具有缩略图大小的ACF图像阵列简单输出

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 具有缩略图大小的ACF图像阵列简单输出相关的知识,希望对你有一定的参考价值。

<?php
				// first, get the image object returned by ACF
				$banner_object = get_field('banner_background_image');
				// and the image size you want to return
				$banner_size = 'banner';
				// now, we'll exctract the image URL from $image_object
				$banner_url = $banner_object['sizes'][$banner_size];
				?>
				
				<!--then output the url of the thumb size as defined-->
				<img src="<?php echo $banner_url; ?>" />

以上是关于php 具有缩略图大小的ACF图像阵列简单输出的主要内容,如果未能解决你的问题,请参考以下文章