Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.


 <?php get_header(); ?>             
    div class="container">
     <?php query_posts('posts_per_page=8&cat=16'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>     
        <div class="post" id="post-<?php the_ID();?>">          
        <div class="container">
        <h3><?php the_title(); ?> </a></h3> 
        <div class="container wrapper ">
        <div class="twelve columns alpha">
        <div id='mySwipe' style='max-width:700px; margin:0 auto' class='swipe'>
        <div class='swipe-wrap'>
                <?php  the_content(); ?>    
        </div> <!--swipe-wrap -->
        </div>  <!--mySwipe -->
        <div class="arrow"> 
    <div class="arrow-left" onclick='mySwipe.prev()'><img src="<?php echo get_bloginfo('template_directory'); ?>/images/arrow_left.png" alt="arrow"/></div> 
    <div class="arrow-right" onclick='mySwipe.next()'><img src="<?php echo get_bloginfo('template_directory'); ?>/images/arrow_right.png" alt="arrow"/></div>
                </div> <!--arrow -->
</div><!--12 columns -->                            
    <div class="four columns last details omega">
    <strong>Title</strong> </br><?php print_custom_field('title_site'); ?><br />
    <strong>Description</strong> </br><?php print_custom_field('Description_site'); ?><br />
    <strong>Tasks</strong> </br><?php print_custom_field('Tasks'); ?><br />
    <strong>Website</strong> </br><?php print_custom_field('visit'); ?><br />
</div> <!--post-->                      
        <?php endwhile; ?>                      
            <?php else : ?>     
            <h3> Not found </h3>        
            <?php endif; ?>
            <?php wp_reset_query(); ?>
<?php get_footer(); ?>


function load_my_scripts() {
wp_register_script( 'swipe.js', get_template_directory_uri() .'/js/swipe.js');
wp_enqueue_script( 'swipe.js');


<script type="text/javascript">
(function() {
    var elem = document.getElementById('mySwipe');
window.mySwipe = Swipe(elem, {
  // startSlide: 4,
  // auto: 3000,
  // continuous: true,
  //disableScroll: true,
  // stopPropagation: true,
  // callback: function(index, element) {},
  // transitionEnd: function(index, element) {}

//with jQuery
window.mySwipe = $('#mySwipe').Swipe().data('Swipe');

When i publish one post image slider and description are available. When i publish more than one post the image slider is not available but not for the case of description which is available. Also, when i delete the swipe for the template and leaves only the <?php the_content(); ?> the images are available. Why this happened and how can resolve this problem;

Thanks in advanced.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.