ACF + Owl Carousel with custom navigation

Combo on creating a carousel using ACF and Owl carousel

<div class="owl-carousel">
		<?php if(get_field('car_images')):$counter = 0; ?>
		
			 <?php while( have_rows('car_images') ): the_row();
                    $color_name = get_sub_field('color_name');
                    $car_image = get_sub_field('car_image');
                    ?>
			
			
				<div class="carColorItem">
					<div data-hash="color-<?php echo $counter;?>">
					<h3><?php echo $color_name; ?></h3>
					<img src="<?php echo $car_image; ?>" alt="" />
					</div>
				</div>
			
			<?php $counter++; endwhile; ?>
			 
			
		 <?php endif; ?> 

		</div>
		<div class="carNav">
			<?php if(get_field('car_images')):$counter = 0; ?>  
			<?php while( have_rows('car_images') ): the_row();
				$color_thumb = get_sub_field('color_thumb');?>
				<a href="#color-<?php echo $counter;?>" class="<?php if (!$counter) {?>active<?php }?>">
					<img src="<?php echo $color_thumb; ?>" alt="" /> 
				</a>
			<?php $counter++; endwhile; ?>
			<?php endif; ?>
		</div>
		</div>

The jQuery:

	$('.owl-carousel').owlCarousel({
		loop:false,
		dots:true,
		items:1,
		URLhashListener:true,
        startPosition: 'URLHash'
	})	

	
	$('.carNav').on('click', 'a', function() {
    $('.carNav a.active').removeClass('active');
    $(this).addClass('active');
	});

Insert PHP Code to the wordpress post/pages

a good plugin – especially if you use visual composer, but want to do custom query at the page.

Insert PHP Code Snippet

Sample code to display custom query

query_posts('post_type=gallery&order=DESC');?>
<?php if (have_posts()) : while (have_posts()) : the_post();?>
     <li>
          <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
     </li>
<?php endwhile; else: ?>

<?php endif; ?>
<?php wp_reset_query(); ?>