Hello I have to create a wordpress slideshow. I want the loop to list out posts as

  • This is actually the html

    <div id="container">
        <div id="content">
            <div id="slider">
                <ul>
                    <li>
                        <img src="images/slide01.jpg" alt="Css Template Preview" /></li>
                                                <li>
                        <img src="images/slide02.jpg" alt="Css Template Preview" /></li>
                                                <li>
                        <img src="images/slide03.jpg" alt="Css Template Preview" /></li>
                </ul>
            </div>
        </div>
    </div>
    

    this is actually the php.

    <div id="container">
    <div id="content">
        <div id="slider">
            <?php $query= 'cat=3'; ?>
            <?php query_posts($query); ?>
            <?php if(have_posts()) : ?>
            <?php while(have_posts()) : the_post(); ?>
            <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
            <?php the_content(); ?>
            <?php endwhile; ?>
            <?php endif; ?>
        </div>
    </div>
    

    And So I guess you've posts each that contains only one image and you need to list these posts like a slideshow? If that's the case, you could do this it such as this (untested code):

    <div id="container">
    <div id="content">
        <div id="slider">
            <ul>
            <?php 
                $query= 'cat=3'; 
                query_posts($query);
                if(have_posts()) :
                while(have_posts()) : the_post();
            ?>
            <li><?php the_content(); ?></li>
            <?php 
                endwhile;
                endif;
            ?>
            </ul>
        </div>
    </div>