Multiple JCarousels in Template
-
Background Info:
On my homepage, I have a custom loop that takes all posts with a specified category and dumps them into the carousel. Each post has custom field assigned to it that holds the value of an image path.That works properly, but now I want to view each post on one page (Category.php) and have multiple carousels representing multiple posts. (Each post will have multiple custom fields with different image paths)
The code for my category.php file is:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <ul id="mycarousel" class="jcarousel-skin-portfolio"> <?php $thumbnail = get_post_meta($post->ID, 'thumbnail', true); ?> <li> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <img src="<?php echo $thumbnail; ?>" alt="<?php the_title(); ?>" /> </a> </li> </ul> <?php endwhile; endif; ?>
As of right now, only the latest post displays with the carousel tags but every succeeding post does not. Any help would be appreciated!
- The topic ‘Multiple JCarousels in Template’ is closed to new replies.