Arthemia jCarousel Number of Posts
This is primarily just a note to myself on how to change the number of visible items in the jCarousel implementation for the WordPress Arthemia theme. Recently I finally updated to the current version and everything looks fine, except the jCarousel slider on the home page was showing only three posts at a time, instead of the previous five. My rule is: if it took me more than fifteen minutes to figure out a problem, then it’s worth documenting. Think about it this way: if your life was worth $2.8 million, then 15 minutes would cost you about a dollar. Doesn’t sound like much, but why waste a buck on something you already own, right?
Edit ~/wp-content/themes/arthemia-premium/includes/js/arthemia.js and adjust the “max:” and “height:” settings to the desired values. The “max” refers to the maximum number of posts visible simultaneously in the jCarousel slider. The “height” is “max” multiplied by the image height. The latter can be looked up in ~/wp-content/themes/arthemia-premium/css/skin.css under “.jcarousel-item”. The default image height is 79 pixels, so, in the example below, 5 items multiplied by 79 pixels comes out to be 395 pixels. And that’s what I have below as the “height” value.
$('#mycarousel').imagesLoaded(function(){ $(this).carouFredSel({ direction: 'up', auto: carouselSpeed, items: { visible: { min: 1, max: 5 }, height: 'variable' }, height: 395, scroll: { items: 1, pauseOnHover: true }, circular: true, infinite: true, next: '.carousel-nav-next', prev: '.carousel-nav-prev' }); });