I am learning how to create custom WordPress theme from this page
and everything is working except commenting system because they haven’t described how to enable it (they only used <?php comment_form(); ?>
to insert form into template). I can see my comment in the backend but not in the page itself (I can see a link showing 1 comment but when I click it nothing happens). Obviously I need some PHP code to show my comments but have no idea where to start! I am stuck because I just started to learn Theme Development and my PHP knowledge is limited.
Can anyone give me a suggestion or a solution for that problem? It would a mean a lot to me.
Index php looks like this:
<?php get_header(); ?>
<div id="blog">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class="post">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="entry">
<?php the_post_thumbnail(); ?>
<?php the_content(); ?>
<p class="postmetadata">
<?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php the_author(); ?><br />
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?>
</p>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php posts_nav_link(); ?>
</div>
<?php endif; ?>
</div>
My WordPress page HERE
Thank You!!
Edit your
comments.php
template and add inThis should display comments, pingbacks and trackbacks. See the Codex for
wp_list_comments()
for help on how to style and separate or to display just comments.