Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php while ( have_posts() ) : the_post(); ?>
- <?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 ) {
- $total_images = count( $images );
- $image = array_shift( $images );
- echo $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
- }
- the_title();
- the_content();
- ?>
- <?php comments_number( 'no responses', 'one response', '% responses' ); ?>.
- <?php endwhile; // end of the loop. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement