• Hi All

    Basically I am using the code below to generate a slideshow of the featured image from all posts within a category (in this case category 1), obviously this uses other bits of code elsewhere, namely get_the_image to pull the image and jquery to create the slideshow – these aren’t the bits I’d like to change…

    <?php $i = 0; $slideshow_query = new WP_Query("showposts=10&cat=1"); ?>
        <?php while ($slideshow_query->have_posts() && $i<=10) : $slideshow_query->the_post(); $do_not_duplicate = $post->ID; ?>
                <?php $i++; ?>
                <div class="slide">
                    <?php get_the_image( array( 'custom_key' => array( 'slideshow' ), 'default_size' => 'medium', 'width' => '', 'height' => '', 'image_class' => '' ) ); ?>
                </div>
        <?php endwhile; wp_reset_query(); $i = 0; ?>

    What I’m hoping to do is to use this in my single.php to create a slideshow of all the images in the current post.
    essentially I am asking how to create a sort of loop which displays all the images from a post., each one contained in a preddefined set of divs…

    make sense?

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to pull all the images from a post into the page’ is closed to new replies.