Support » Fixing WordPress » customizing comments

  • this has been killing me for the past few days…i’m using WP 1.5.

    i can’t seem to get my comments to show up in my own personal template that i have created. i have a feeling that it has something to do with ‘The Loop’ or the comments loop.

    here’s how i would like my single post to display….

    here’s what it keeps happening…

    the default ‘no comments’ yet appears. here’s the php code for my ‘single.php’

    <div id="main">
    <div id="blog"> <!-- BLOG PROPER -->

    <div class="entry">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_title('<h2>','</h2>'); ?>
    <h3><?php the_time('l, F jS, Y @ g:ia'); ?> </h3>
    <p><?php comments_number('(0) comments','(1) comment','(%) comments'); ?> | find this in : <?php the_category(','); ?></p>
    <?php the_content(); ?>

    <div id="msg">
    <?php comments_template(); ?>

    <div id="side">
    <div id="comment">
    <h1>commentary</h1> <!-- COMMENTS -->
    <?php if ($comments) { ?>
    <div class="commententry">
    <?php foreach ($comments as $comment) { ?>
    <p class="short"><a href="<?php comment_author_url_link('linktext', 'before', 'after'); ?> "><?php comment_author(); ?> </a> says</p>
    <?php comment_text(); ?>
    <p><?php comment_time('H:M'); ?> </p>
    <?php } // end for each comment ?>

    <?php } else { // this is displayed if there are no comments so far ?>
    <p><?php _e("No comments yet."); ?></p> <?php } ?>
    <?php endforeach; else: ?> <p><?php _e('Sorry, no posts matched your criteria. sucka!'); ?></p> <?php endif; ?>


    what i’ve done is pretty much cut and past code from the ‘wp-comments.php’ template and tried to put them to how my template is designed.

    i’m actually learning PHP as i’m putting this site together. so please be gentle on me. any help would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • i got it working…. even though no one was friendly enough to help. maybe i didn’t explain myself properly?

    still hackin’ away at this code.

    I am trying to do this same thing and am cutting and pasting from my wp-comments.php template and putting that code into my single.php page. The comment form is showing but the actual comments aren’t. I’d love some insight into how you fixed this issue. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘customizing comments’ is closed to new replies.