In my current wordpress customisation project, I have some custom image upload fields for some custom post types.
On the front end I will receive the data from these custom fields , ie. URLs of these custom images using the function get_post_meta( ).But in that case I get the original full sized image uploaded through the meta box.How can I get the thumbnail of the uploaded meta field.There are more than one image fields for the post type.Here is my current code for getting images
$meta = get_post_meta( $post_id );
//print_r($meta);
$client = $meta['client'][0];
$channel = $meta['channel'][0];
$logistics = $meta['logistics'][0];
$head = $meta['headline2'][0];
$img1 = isset($meta['image1'])?$meta['image1']:'';//image field 1
$img2 = isset($meta['image2'])?$meta['image2']:'';//image field 2
$img3 = isset($meta['image3'])?$meta['image3']:'';//image field 3
1 comment