I use this code on my homepage to display recent posts made on my site. I wanted to use this code to display recent posts on single pages as well, but when I use it, it only displays the current post rather than the latest posts. I’m sure I am just doing something wrong with the loop but I can’t figure it out. Any help is really appreciated!
<?php while (have_posts()) : the_post(); ?> <div class="wide3"> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a> <a href="<?php the_permalink() ?>" class="product"> <?php echo c2c_get_custom('pic'); ?> <span><?php echo c2c_get_custom('price'); ?></span> </a> </div> <?php endwhile; ?>
- The topic ‘Display Recent Posts in Single.php’ is closed to new replies.