Display Both single and multi view posts in home.php (2 posts)

  1. silentgap
    Posted 7 years ago #

    In the home.php template i'm using the below method to display comments for a single post in my first loop:

    <?php $wp_query->is_single = true; ?>
    <?php comments_template('/includes/home_comments.php'); ?>
    <?php $wp_query->is_single = false; ?>

    Later in the template I'm running the loop again trying to display the other posts in that same category, but only one post is showing up. Modifications to the query_posts() doesn't seem to get me anywhere.

    Any thoughts on this one?

  2. MichaelH
    Posted 7 years ago #

    You tried using the showposts= parameter with template tag, query_posts()?

    Also depending on your code you may need wp_reset_query

Topic Closed

This topic has been closed to new replies.

About this Topic