/ Published in: PHP
description from title, image size from function.php (add_image_size( 'descr', 278, 200, true );)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $images = get_children(array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 1000, 'offset'=>1)); } else { echo '<ul class="descr-phot">'; foreach ( $images as $attachment_id => $attachment ) { echo '<li>'; $large_image_url = wp_get_attachment_image_src( $attachment_id, 'full'); $thumb = wp_get_attachment_image_src( $attachment_id, 'descr'); echo '<a href="' . $large_image_url[0] . '" class="thickbox">'; echo '<img src="'. $thumb[0]. '" />'; echo '</a>'; echo '<span>'. $attachment->post_title .'</span>'; echo '</li>'; } echo '</ul>'; } ?>