Support » Fixing WordPress » Get Images from a post/page display in jquery slideshow

  • Hi there,

    I need to to grab all the images from a post and be able to display them in a slideshow, for example I need the call code to appear in the loop here…

    <?php $i = 0; while ($bg_clients->have_posts() && $i < 1) : $bg_clients->the_post(); ?>
    <div class="slider">
    <ul>
    <li><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">IMG TAG HERE</a>
    </li>
    </ul>
    	<?php $i++; endwhile; ?>

    But I’m not sure of the PHP, I found this example, but it cropped the images weirdly to a square thumbnail and stretched them?
    http://www.rlmseo.com/blog/get-images-attached-to-post/

    Also I know there is the default:
    http://codex.wordpress.org/Function_Reference/get_children

    To get the first image, is there a way to modify this, though when I place this code in my functions file and call it, it calls my first ever media upload and does not take any notice of the loop it’s in, any help?

  • The topic ‘Get Images from a post/page display in jquery slideshow’ is closed to new replies.