Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_all_image_from_post()
- {
- global $post;
- $imagenes = get_posts(array('post_parent' => $post->ID,
- 'post_mime_type' => 'image',
- 'post_type' => 'attachment',
- 'exclude' => array(get_post_thumbnail_id()),
- 'numberposts' => -1
- )
- );
- $listado_imagenes = array();
- foreach ($imagenes as $imagen){
- $image_src = wp_get_attachment_image_src($imagen, 'full');
- $listado_imagenes[] = $imagen[0];
- }
- return $listado_imagenes;
- }
- $imagenes = get_all_image_from_post();
- foreach ($imagenes as $imagen): ?>
- <img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $imagen; ?>&h=260&w=260" class="index" alt="<?php the_title(); ?>" title="<?php the_title(); ?>, <?php comments_number('No comments','One comment','% comments'); ?>" />
- <?php endforeach; ?>
Advertisement
Add Comment
Please, Sign In to add comment