only one thumbnail
Viewing 1 Posts - 1 through 1 (of 1 total)
Author | Posts |
---|---|
December 1, 2013 at 4:44 pm 13095 | |
Tareq Hasan | hello just a php question if i want only one thumbail the first one picture how can i do that ? thanks $images = get_post_meta( $post->ID, 'photo_du_projet' ); if ( $images ) { foreach ( $images as $attachment_id ) { $thumb = wp_get_attachment_image( $attachment_id, 'thumbnail' ); $full_size = wp_get_attachment_url( $attachment_id ); printf( '%s', $full_size, $thumb ); } } ?> |
December 3, 2013 at 4:06 pm 13202 | |
Tareq Hasan | Use like this: if ( $images ) { printf( ‘%s’, $full_size, $thumb ); |
Viewing 1 Posts - 1 through 1 (of 1 total)