It’s common to have a jQuery slider on the homepage of your news/magazine WordPress website showing off top, recent or featured blog post news stories. Usually these posts show a thumbnail image, the post title, the date, a post excerpt and a link of course. Having these featured posts can draw attention to specific posts. There are plenty of WordPress content slider plugins out there for this purpose, but what if you wanted this feature on a non-WordPress site? I had just that requirement so I coded one (built off of the bxSlider script), and here it is, feel free to use it on your projects!
The slider turns each list item into a slide, with a left column and a right column, here is a glance at the code:
<li> <div class="left-box"> <a href="#"><img src="http://placehold.it/270x240" /></a> </div> <div class="right-box"> <h3><a href="#">News Title Right Here</a></h3> <p class="date">August 14, 2014</p> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.</p> <p><a href="#">Read full article</a></p> </div> </li>
Don’t forget to check out http://bxslider.com/, a great MIT licensed script.