You may have noticed a nice content slider on the new homepage for Brackish Waters Design. This was implemented using Chris Coyier’s AnythingSlider which I have found to be very useful in the past few months. Its ability to handle multiple types of data and slide smoothly with JQuery was a definite plus. It took a bit of work but I was able to get the slider to grab 6 of latest posts to a specific category and automatically display these in the panes.
I run a separate include file for my home loop in WordPress which I will provide here but I will dump a bunch of the actions that you would not have.
<div id="slideshow"> <ul id="slider1"> <?php if (have_posts()) : ?> <?php $recent = new WP_Query("cat=11&showposts=6"); while($recent->have_posts()) : $recent->the_post();?> <li> <article class="article"> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-content"> <?php the_excerpt(); ?> </div> </div> </article> </li> <?php endwhile; ?> <?php endif; ?> </ul> </div>