'attachment',
'post_status' => 'any',
'post_mime_type' => array( 'image/jpeg', 'image/png', 'image/bmp', 'image/tiff', 'image/x-png', 'image/pjpeg', 'image/jpg' ),
'posts_per_page' => $count,
'paged' => $paged
);
$query = new WP_Query( $args );
?>
have_posts() ) : // If have post START. ?>
have_posts() ) : $query->the_post(); // Start Loop: ?>
post->ID, 'full', false ); // get image link
$alt = get_post_meta($query->post->ID, '_wp_attachment_image_alt', true); // get image alt
$caption = get_post($query->post->ID); // get image caption
$title = get_post($query->post->ID); // get image title
if( !empty($alt) ){
$alt_attr = ' alt="'.$alt.'"';
}else{
$alt_attr = null;
}
if( !empty($caption->post_excerpt) ){
$caption_attr = ' title="'.$caption->post_excerpt.'"';
}else{
$caption_attr = null;
}
if( !empty($title->post_title) ){
$figcaption = ' src="">
Go to "Media" > "Add New" and upload images to display it here.