//IMAGE ATTACHMENTS TOOLBOX function attachment_toolbox($size = thumbnail) { if($images = get_children(array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'numberposts' => -1, // show all 'post_status' => null, 'post_mime_type' => 'image', 'orderby' => 'menu_order' ))) { foreach($images as $image) { $attimg = wp_get_attachment_image($image->ID,$size); $atturl = wp_get_attachment_url($image->ID); $attlink = get_attachment_link($image->ID); $postlink = get_permalink($image->post_parent); $atttitle = apply_filters('the_title',$image->post_title); /* echo '

wp_get_attachment_image()
'.$attimg.'

'; echo '

wp_get_attachment_url()
'.$atturl.'

'; echo '

get_attachment_link()
'.$attlink.'

'; echo '

get_permalink()
'.$postlink.'

'; echo '

Title of attachment
'.$atttitle.'

'; echo '

Image link to attachment page
'.$attimg.'

'; echo '

Image link to attachment post
'.$attimg.'

'; echo '

Image link to attachment file
'.$attimg.'

'; */ echo'
  • '.$attimg.'
  • '; } } }