I don’t understand the comment system
I try to develop a new theme from scratch – to make sure I understand every single bit of WordPress. 🙂
I proceeded quite well so far; the only thing I have REALLY troubles with is the comment system: for some reason, the line containing the “Edit” and “x comments” underneath each article does not appear….
I only have an index.php, header.php, sidebar.php footer.php, and functions.php in my theme (beside the css and the searchbar.php include); I created a comments.php, but this did not work. Here’s part of header.php:
... <?php //comments_popup_script(); // off by default ?> <?php wp_head(); ?> </head> <body> <div id="header"> <h1><?php bloginfo('title') ?></h1> <ul> <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); /* list pages by menu-order but only first hierarchy */ ?> <li><?php include (TEMPLATEPATH . '/searchform.php'); ?></li>
Here’s my index.php:
<?php get_header(); ?> <?php get_sidebar(); ?> <div id="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <small>In <?php the_category(","); ?> on <?php the_date(); ?> </small> <?php the_content("More"); ?> <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?> </div> <!-- end of post-container --> <?php endwhile; ?> <?php else : /*no posts? */ ?> <h2>Not Found</h2> <p>Sorry, but you are looking for something that isn't here.</p> <!-- <?php include (TEMPLATEPATH . "/searchform.php"); ?> --> <?php endif; /* if post available */ ?> </div> <!-- end of "content" container --> <?php get_footer(); ?>
When I look at the page containing an individual post, I see the header, the sidebar, the post itself – and directly underneath the footer; there is NO comment line…
When I switch to another theme, everything works as designed…
Sorry if this is a long post – but I really, really don’t know what I am doing wrong……. 🙁
- The topic ‘I don’t understand the comment system’ is closed to new replies.