WordPress.org

Ready to get started?Download WordPress

Forums

adding related posts listing to single post without plugins (1 post)

  1. totallytop10
    Member
    Posted 4 years ago #

    hi,
    i am trying to add a listing below each single post of related posts. but after some troubleshooting i have settled on simply listing recent posts. this however does not work, and the best i've done is listing the same posts i am currently viewing.

    the code i am using (had to include the reset query in order not to screw up the comments:

    <?php $recent = new WP_Query('showposts=8'); while($recent->have_posts()) : $recent->the_post(); $post = $original_post; ?> <?php end>
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

    this is the site (look furthest down):

    http://totallytop10.com/science-technology/engineering/top-10-geo-ingineering-ideas-to-save-our-planet

    any help?

Topic Closed

This topic has been closed to new replies.

About this Topic