Malsup cycle 2 pagers in wp

Could i please get some advice on how to solve this? am using malsap cycle 2 for a slider.http://jquery.malsup.com/cycle2/demo/pager.php
but how can i have the pager (id=adv-custom-pager)reflect the thumbnail, or excerpt?

thank you
D

 <div id="sliderSection" class="sliderSection">
			  <!-- Wrapper for slides -->
			  
	<div class="cycle-slideshow composite-example" 
    data-cycle-fx="scrollHorz" 
    data-cycle-slides="> div"
    data-cycle-timeout="3000"
	data-cycle-pager="#adv-custom-pager"
    data-cycle-pager-template="<a href='#'><img src='{{src}}' width=20 height=20></a>"
    >
		<div>
			<div class="slide">
					<!-- 
					<img src="<!--  ?php echo get_stylesheet_directory_uri() ?>/imgs/image.jpg" alt="" title="" width="" height="" class="image-responsive" />
					
					  -->
					 <div class="slideBody">	 
					  <?php
							$args = array(
								'category_name'  => 'seminars',
								'posts_per_page'  => 1
								 );

							$my_query = new WP_Query( $args );
							if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>	
											
							<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?>	</a>
							
						</div>	
						<div class="excerpt"><?php the_excerpt(); ?></div>
							
							<?php
							endwhile;
							endif;
							wp_reset_query(); 
						?>
					</div>
		</div>
		<div>
			<div class="slide">
						<div class="slideBody">	
						<?php
							$args = array(
								'category_name'  => 'focus',
								'posts_per_page'  => 1
								 );

							$my_query = new WP_Query( $args );
							if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>	
							
							<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?>	</a>
						</div>	
						<div class="excerpt"><?php the_excerpt(); ?></div>
							<?php
							endwhile;
							endif;
							wp_reset_query(); 
						?>
						
					</div>
		</div>
		<div>
			<div class="slide">
				<div class="slideBody">	
					<?php
						$args = array(
						'category_name'  => 'blog',
						'posts_per_page'  => 1
								 );

						$my_query = new WP_Query( $args );
						if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>	
											
						<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?>	</a>
						</div>	
							
						<div class="excerpt"><?php the_excerpt(); ?></div>
							<?php
							endwhile;
							endif;
							wp_reset_query(); 
						?>
						</div>
		</div>
	   
	</div> <!-- cycle-slideshow composite-example end -->
	<div id=adv-custom-pager class="center external"></div>
	<div class="clear"></div>
	</div>

Perhaps explain a bit more what’s not working. Are you using the version with thumbnails, and having problems?

Sorry i wasn’t clear, yes. i don’t quite see how i can call the
<?php the_post_thumbnail(); ?>
in the code below

data-cycle-pager-template="<a href='#'><img src='{{src}}' width=20 height=20></a>"

as it is out of the loop. And can’t think of any way to do it.
thx
D

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.