Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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; ?>" />
Source by mrwp.io #
 
PREVIOUS NEXT
Tagged: #acf #image #title
ADD COMMENT
Topic
Name
1+3 =