Created
August 3, 2012 21:28
-
-
Save eveevans/3251688 to your computer and use it in GitHub Desktop.
extraer todas las imagenes asociadas de un post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1><?php the_title() ?></h1> | |
<?php | |
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); | |
if ( $images ) : | |
?> | |
<?php foreach($images as $ima): ?> | |
<div class="gallery-thumb ev-gallery"> | |
<a rel="ev-gallery" class="size-thumbnail" href="<?php echo wp_get_attachment_url($ima->ID); ?>"><?php echo wp_get_attachment_image( $ima->ID, 'thumbnail' ); ?></a> | |
</div> | |
<?php endforeach; | |
?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment