Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Advanced Custom Fields get sub field image

<?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 :: codeigniter session destroy automatically after redirect 
Php :: get_adjacent_post wordpress 
Php :: php try json decode and check 
Php :: how to check path laravel 
Php :: laravel with and where 
Php :: how to make a child theme in wordpress 
Php :: cmd disable wifi driver 
Php :: laravel vue browser cache auto clear 
Php :: laravel hash namespace 
Php :: laravel localization 
Php :: wordpress change post format 
Php :: laravel add package without updating 
Php :: group_concat mysql limit issue 
Php :: laravel select where with total sum query to get all data with sum 
Php :: convert php array to javascript json laravel 
Php :: php convert latitude longitude to map tile 
Php :: woocommerce order status change 
Php :: laravel logout all users 
Php :: php count string in array 
Php :: jquery is less than or equal to 
Php :: nested for loop in php 
Php :: laravel route multiple middleware 
Php :: getimagesize php 
Php :: laravel pluck 
Php :: Program for factorial of a number in php 
Php :: acos() php 
Php :: database, counts,php, 
Php :: woocommerce view order details frontend with shortcode 
Php :: php my admin on linux 
Php :: change or set post type wordpress 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =