• Below is the code that I have in my wp-comments-popup template:

    <?php if ($comments) { ?>
    <?php foreach ($comments as $comment) { ?>
    <id=”comment-<?php comment_ID() ?>”>
    <?php comment_text() ?>
    Posted by <?php comment_author_link() ?> on <?php comment_date() ?> @ <?php comment_time() ?>
    <?php } // end for each comment ?>
    <?php } else { // this is displayed if there are no comments so far ?>
    No comments yet.
    <?php } ?>

    The problem I’m having is that my “posted by” line has a line break or something before it, making the comment output look like this:

    WP wasn’t too hard once I got the hang of it. I had to ask a lot of questions though, via Sara and the support forums. I really do like it much better than MT though. Email me if you have more questions!
    Posted by Jenni on Feb. 21, 2004 @ 9:58 pm

    What I would like it to look like is this:

    WP wasn’t too hard once I got the hang of it. I had to ask a lot of questions though, via Sara and the support forums. I really do like it much better than MT though. Email me if you have more questions!
    Posted by Jenni on Feb. 21, 2004 @ 9:58 pm

    With no space between the comment body and the “posted by” line. Anyone have any ideas on how to accomplish this? Am I overlooking something simple?
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • What happens if you alter the code from this:
    <?php comment_text() ?>
    Posted by <?php comment_author_link() ?>
    to this:
    <?php comment_text() ?> Posted by <?php comment_author_link() ?>
    ?

    That was what I was going to ask… 😉
    It could be a natural carriage-return in the ‘html’ side of the output.
    Otherwise, it could be a css/formatting thing between paragraphs (default [p] formatting…).
    -d
    http://www.chait.net

    Thread Starter daisyhead

    (@daisyhead)

    Going to give that a try right now!

    Thread Starter daisyhead

    (@daisyhead)

    What file formats the output of the “comments-popup” template? There must be paragraph tags there that are formatting the output.

    Thread Starter daisyhead

    (@daisyhead)

    Anyone else have any idea on how to fix this issue??

    Daisyhead,
    This will work:
    In wp-comments-popup:
    <?php if ($comments) { ?>
    <?php foreach ($comments as $comment) { ?>
    <ol id=”comments”>
    <li id=”comment-<?php comment_ID() ?>”>
    <?php comment_text() ?>
    Posted by <?php comment_author_link() ?> on <?php comment_date() ?> @ <?php comment_time() ?>

    <?php } // end for each comment ?>
    <?php } else { // this is displayed if there are no comments so far ?>
    No comments yet.
    <?php } ?>
    In your style sheet, add:
    div.logbody p {margin-bottom: 0.5em; margin-top: 0.5em;}
    ol#comments li { margin-bottom: 1.5em; }
    If you don’t want the comment numbers, add list-style: none; to the ol#comments li definition. Plus, you can experiment with the top and bottom margins to get them how you want…
    -Tony

    Thread Starter daisyhead

    (@daisyhead)

    Thank you! That worked perfectly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘wp-comments-popup help needed’ is closed to new replies.