how to get comments running
-
Hi
Am making my first template for wp – and the documentation is great. However I can’t find how to get the comments to display and the comments forms.
Here’s my code so far – as you can see heavily relient on the documentation examples!
[code]
<?php
/**
* @package WordPress
* @subpackage Classic_Theme
*/
get_header();?>
<div id="edPosts">
<!-- Start the Loop. -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><!-- The following tests if the current post is in category 3. -->
<!-- If it is, the div box is given the CSS class "post-cat-three". -->
<!-- Otherwise, the div box will be given the CSS class "post". -->
<?php if ( in_category('3') ) { ?>
<div class="post-cat-three">
<?php } else { ?>
<div class="post">
<?php } ?><!-- Display the Title as a link to the Post's permalink. -->
<h2>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2><!-- Display the date (November 16th, 2009 format) and a link to other posts by this posts author. -->
<small><?php the_time('F jS, Y') ?> by <?php the_author() ?></small><!-- Display the Post's Content in a div box. -->
<div class="entry">
<?php the_content(); ?>
</div><!-- Display a comma separated list of the Post's Categories. -->
<p class="postmetadata">Posted in <?php the_category(', '); ?></p>
</div> <!-- closes the first div box -->
<h3>add spacer</h3>
<!-- Stop The Loop (but note the "else:" - see next line). -->
<?php endwhile; else: ?><!-- The very first "if" tested to see if there were any Posts to -->
<!-- display. This "else" part tells what do if there weren't any. -->
<p>Sorry, no posts matched your criteria.</p><!-- REALLY stop The Loop. -->
<?php endif; ?>
<!-- end edPosts -->
</div>
<?php
get_footer();
?>
[/code]Not sure where to put the get_comments or include (“comments.php”);
Perhaps someone could kindly tell me or just point ot the right documentation?
Thanks in advance
Edward
- The topic ‘how to get comments running’ is closed to new replies.