kenhamster
New Member
I am doing some WordPress theming. I have a #novelsslider div. Inside of #novels, I used this code to get the latest three posts in the "novels" category, inside of the html divs, I used some php functions to get the latest 3 posts and load the html 3 times floated to the left to build a slider:\[code\]<!-- slider --> <div id="novelsslider" class="slider"><? $novels = get_option('of_novels') ?><?php query_posts('category_name=$novels&posts_per_page=3'); ?><?php while (have_posts()) : the_post(); ?> <div class="sliderunit"> <?php the_post_thumbnail(); ?> <div class="novelsslidertitle"> <div class="arrow-left"></div> <a href="http://stackoverflow.com/questions/15857241/<?php the_permalink(); ?>"> <img class="cross" src="http://stackoverflow.com/questions/15857241/<?php bloginfo('stylesheet_directory'); ?>/images/cross.png"/> </a> <a href="http://stackoverflow.com/questions/15857241/<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </div> </div> <?php endwhile;?> <div id="novelsslidebars"> <input type="submit" value="" class="slidebars" id="novelsslidebtnleft"> <input type="submit" value="" class="slidebars" id="novelsslidebtnmiddle"> <input type="submit" value="" class="slidebars" id="novelsslidebtnright"> </div> </div> <!-- End novelsslider -->\[/code\]ow I have some arrows.. I want them when clicked to get a set of previous 3 posts and load them, how can I do such a loop?