WordPress.org

Ready to get started?Download WordPress

Forums

Put comments to display under posts (7 posts)

  1. Zoltar
    Member
    Posted 5 years ago #

    Hi there

    This is a feature I've seen on a lot of sites around, and I am trying desperately to add to mine but it seems impossible. I've tried within the main loop with no results, altought it seems to be the correct method.
    Can somebody help, please? I'm sure a lot of people will be benefit from this doubt also.

    Thank you for all of the community.

  2. seejee
    Member
    Posted 5 years ago #

    is this on the main index?

    or are the comments not showing when you're in the actual post page?

  3. beejoy
    Member
    Posted 5 years ago #

    Hi

    Is there an answer to this I would like to have my comments displayed under the posts and to be seen along with the posts.

    Can anyone help

    Cheers
    BJ

  4. nazcar
    Member
    Posted 5 years ago #

    add this in your single post template:

    <?php comments_template(); ?>

  5. beejoy
    Member
    Posted 5 years ago #

    Thanks nazcar

    but under what line of code does it go

    Cheers
    BJ

  6. nazcar
    Member
    Posted 5 years ago #

    before

    <?php endwhile; else : ?>
    
    		<h2><?php _e(getLangTrans('notfound')); ?></h2>
    
    		<p><?php _e(getLangTrans('sitenotfound')); ?></p>
    
    		<h3><?php _e(getLangTrans('search')); ?></h3>
    
    		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
    
    	<?php endif; ?>

    or above navigation if present.

    then you can add css to define its width and style.

  7. beejoy
    Member
    Posted 5 years ago #

    thanks nazcar

    I am sorry I am a new user at php

    I am using the studiopress theme and i have pasted the code to the single post page single.php here, It does not seem to put the comments under the post on the post page.

    <?php get_header(); ?><div id="contentwrapper"><div id="content"><div class="adsense_top"><?php include (TEMPLATEPATH . '/adsense_top.php'); ?></div><?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?><div class="post"><h2 class="postTitle">"><?php the_title(); ?></h2><div class="postMeta"><span class="date"><?php the_time('M.d, Y') ?></span> in<span class="filed"><?php the_category(', '); ?></span></div><div class="postContent"><?php the_content('(Read the rest of this entry...)'); ?></div><div class="postMeta"><span class="tags"><?php the_tags('Tags: ', ', ', ''); ?></span></div></div> <!-- Closes Post --><div class="comment"></div> <!-- Closes Comments --><?php comments_template(); ?><?php endwhile; ?><?php else : ?><div class="post"><h2 class="center">Not Found</h2><p class="center">Sorry, but you are looking for something that isn't here.</p></div> <!-- Closes Post --><?php endif; ?></div></div> <!-- Closes Content --><?php get_sidebar(); ?><div class="cleared"></div></div> <!-- Closes Main --><div class="bottomcurvewhite"></div><?php get_footer(); ?>

    Sorry about this but I am very grateful

    Cheers

    bj

Topic Closed

This topic has been closed to new replies.

About this Topic