Search
 
SCRIPT & CODE EXAMPLE
 

PHP

acf sub_field image title

<?php
$imageID = get_sub_field('your_field');
$image = wp_get_attachment_image_src( $imageID, 'full' );
$alt_text = get_post_meta($imageID, '_wp_attachment_image_alt', true);
?>
<img src="<?php echo $image[0]; ?>" alt="<?php echo $alt_text; ?>" />
Comment

PREVIOUS NEXT
Code Example
Php :: enum in migration laravel 
Php :: switch php version ubuntu 20.04 
Php :: refresh laravel model 
Php :: symfony messenger rabbitMQ 
Php :: how to make a child theme in wordpress 
Php :: Remove prefix on category title 
Php :: how to debug in wordpress 
Php :: laravel inline if else if 
Php :: laravel convert querybuilder to string 
Php :: Laravel jwt check token sent by request is valid 
Php :: laravel modules 
Php :: contact form 7 remove br 
Php :: Hide Categories - Woocommerce Product Page 
Php :: clear session in laravel 
Php :: json encode php 
Php :: how to assign variable in php 
Php :: php + set timezone berlin 
Php :: laravel filesystem link 
Php :: How do I get a YouTube video thumbnail from the YouTube API? 
Php :: laravel get all request parameters 
Php :: laravel copy 
Php :: link to internal pages in wp php 
Php :: laravel controller constructor auth user null 
Php :: laravel belongs to 
Php :: how to setup cron job for laravel queues on shared hosting 
Php :: php error handling 
Php :: get array of last 3 dates with carbon 
Php :: check if input file is empty in php 
Php :: How to Auto Backup Mysql Database Using PHP Script 
Php :: foreach loop not working in php 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =