WordPress.org

Ready to get started?Download WordPress

Forums

Help with The Loop (3 posts)

  1. Pete White
    Member
    Posted 4 years ago #

    Hello,
    I am having some issues with a site and would be greatly appreciative if someone could provide some assistance. The issue is that on the blog's home page, the "comment cloud" that displays the number of comments is only being displayed for the first post and not all posts.

    I've pasted the code below:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. Pete White
    Member
    Posted 4 years ago #

    <?php get_header(); ?>
            <div class="outer">
              <div class="inner">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
              	<div class="span-4 comments clearfix">
                	<p><a href="<?php comments_link(); ?>">
                	<?php comments_number('No comments', '1 comment', '% comments'); ?></a></p>
              	</div>
                <div class="span-14 last blog">
                	<div class="sub content">
                   	<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
                	<p class="meta">On <span class="date"><?php the_time('F j, Y'); ?></span>, in <?php the_category(', '); ?></p>
    
                	<?php the_content(); ?>
    
                	<?php endwhile; else: ?>
    
                	<h2>Woops...</h2>
    
                	<p>Sorry, no posts we're found.</p>
    
                	<?php endif; ?>
                	<?php comments_template();?>
                	</div>
                </div>
              </div>
            </div>
          </div>
          <?php get_sidebar(); ?>
        </div>
      </div>
    </div>
    <?php get_footer(); ?>
  3. Pete White
    Member
    Posted 4 years ago #

    anybody?

Topic Closed

This topic has been closed to new replies.

About this Topic