• Resolved kortschot

    (@kortschot)


    Can anybody shed some light on my Loop… the second part posts the permalink of the page instead of the remaining posts in the category…. I must be doing something wrong.

    <div id="main-content-werk">
    
            <div id="slider">
              <?php $my_query = new WP_Query('category_name=werk&posts_per_page=3');
               while ($my_query->have_posts()) : $my_query->the_post();
               $do_not_duplicate = $post->ID;?>
               <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID, 'slider-image', true); ?>" alt="" title="<?php the_title(); ?>" /></a>
               <?php endwhile; ?>
             </div> <!-- END slider -->
    
             <br clear="all" />
    
            <?php if (have_posts()) : while (have_posts()) : the_post();
            if( $post->ID == $do_not_duplicate ) continue; ?>
              <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    
            <!-- Do stuff... -->
    
            <?php endwhile; endif; ?>
    
        </div> <!-- end main-content-werk -->
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘My Loop ain't Runnin!’ is closed to new replies.