Title: Customize carousel in wordpress
Last modified: August 20, 2016

---

# Customize carousel in wordpress

 *  [Mraztek](https://wordpress.org/support/users/mraztek/)
 * (@mraztek)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/customize-carousel-in-wordpress/)
 * Currently this code was designed for my wordpress homepage Only but i wanted 
   to use it in my Single.php file and custom display a category in the carousel
   or to make this easy display the content and then display similar to post in 
   the carousel.
 * i want to manually add the code to instead of this requesting information from
   the option page in the functions.php to manually make it works.
 * i can’t explain this better hopefully someone understand.
 * screenshot here [http://easilysharing.com/images/35470846317047834338.jpg](http://easilysharing.com/images/35470846317047834338.jpg)
 *     ```
       <div class="home-featured wall">
       <div class="wrap cf">
   
       <?php
       	$args = (array)get_option('dp_home_featured');
       	$args = dp_parse_query_args($args);
       	$autoplay = !empty($args['autoplay']) ? true : false;
       	$query = new WP_Query($args);
       ?>
   
       <?php if($query->have_posts()): ?>
   
       	<?php
       		/* Load scripts only when needed */
       		wp_enqueue_script('jquery-carousel');
       		wp_enqueue_script('jquery-slides');
       		wp_enqueue_script('jplayer');
       	?>
   
       	<div class="slider">
       	<div class="slider-wrap">  THIS IS BEEN DISPLAY IN THE CONTENT
       		<?php // jQuery slides pluin will add tag '<div class="slides">' here ?>
       			<?php $items = ''; $i = 0; while ($query->have_posts()) : $query->the_post(); global $post; $i++; ?>
       			<div class="slide <?php echo is_video() ? 'item-video' : 'item-post'; ?>" data-id="<?php the_ID(); ?>">
       				<?php
       					$thumb_size = 'custom-large';
       					dp_thumb_html($thumb_size);
       				?>
   
       				<div class="caption">
       					<h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permalink to %s', 'dp'), get_the_title()); ?>"><?php the_title(); ?></a></h2>
       				</div>
       			</div><!-- end .slide -->
       			<?php endwhile; ?>
       		<?php // </div><!-- end .slides--> ?>
       	</div><!-- end .slider-wrap -->
       	</div><!-- end .slider -->
   
       	<div class="carousel">
       	<div class="carousel-container">
       		<div class="carousel-clip"> THIS IS WHAT I CANT TO MAKE CUSTOM
       			<ul class="slider-pagination carousel-list">
       				<?php $items = ''; $i = 0; while ($query->have_posts()) : $query->the_post(); global $post; ?>
       				<li data-id="<?php the_ID(); ?>" class="<?php echo is_video() ? 'item-video' : 'item-post'; ?>">
       				<div class="inner">
       					<?php
       					$thumb_size = 'custom-small';
       					dp_thumb_html($thumb_size);
       					?>
   
       					<div class="data">
       						<h2 class="title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permalink to %s', 'dp'), get_the_title()); ?>"><?php the_title(); ?></a></h2>
   
       						<p class="meta">
       							<span class="time"><?php printf(__('%s ago', 'dp'), human_time(get_the_time('U'))); ?></span>
       						</p>
       					</div>
       				</div>
       				</li>
       				<?php $i++; endwhile; ?>
       			</ul>
       		</div><!-- end .carousel-clip -->
   
       		<div class="carousel-prev"></div>
       		<div class="carousel-next"></div>
       	</div><!-- end .carousel-container -->
       	</div><!-- end .carousel -->
   
       <?php endif; wp_reset_query(); ?>
   
       </div><!-- end .wrap -->
       </div><!-- end #wall -->
       ```
   

The topic ‘Customize carousel in wordpress’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Mraztek](https://wordpress.org/support/users/mraztek/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/customize-carousel-in-wordpress/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
