content-single-job_listing.php
$images = get_custom_field( ‘job_multifile’ );
if ( is_array( $images ) && ! empty( $images ) ){
foreach( $images as $image ){
$thumbnail_id = get_attachment_id_from_url( $image );
$thumbnail = wp_get_attachment_thumb_url( $thumbnail_id );
echo ““;
}
} elseif( ! empty( $images ) ){
$thumbnail_id = get_attachment_id_from_url( $images );
$thumbnail = wp_get_attachment_thumb_url( $thumbnail_id );
echo ““;
}
content-single-job_listing.php
$images = get_custom_field( 'job_multifile' );
if ( is_array( $images ) && ! empty( $images ) ){
foreach( $images as $image ){
$thumbnail_id = get_attachment_id_from_url( $image );
$thumbnail = wp_get_attachment_thumb_url( $thumbnail_id );
echo "<a href="{$image}"><img src="{$thumbnail}"></a>";
}
} elseif( ! empty( $images ) ){
$thumbnail_id = get_attachment_id_from_url( $images );
$thumbnail = wp_get_attachment_thumb_url( $thumbnail_id );
echo "<a href="{$images}"><img src="{$thumbnail}"></a>";
}
No comments yet.