WordPress.org

Ready to get started?Download WordPress

Forums

paragraph tags around comment_text (2 posts)

  1. shelleycat
    Member
    Posted 9 years ago #

    I've just upgraded to 1.5 and am having some trouble getting my comments template to look the way I want it to.

    I want to have the author of each comment directly below the text of that comment. However the php comment_text tag automatically puts paragraph tags around the comment text thus forcing the next line of text to be two lines down (ie there is a gap). And unlike just about every other thing in WordPress the paragraph isn't able to be styled at all.

    I've tried looking in the source code to find where these tags originate from so I can get rid of them, or at least get rid of the closing tag, but I don't really know php so am kinda clueless. Also I still want paragraphs within the comment to show, just not at the end of it. I'm sure I used to have comments set up like this, with the description of who posted and when directly below text, and I don't know why it suddenly changed.

    html tags automatically appearing where I have no control over them irk me in general, and ones that make my page ugly like this annoy me even more. Any ideas of how I can fix it?

  2. MattRead
    Member
    Posted 9 years ago #

    shelleycat, you can fix that with some CSS. I assume you have the comment author in a paragraph, or some tag. So add some CSS to put a negative top margin the comment author tag.

    example:

    <p>blah coment text but with comment spelt right...<p>
    <p class="comment-author">by Joe Blow</p>

    and the CSS

    .comment-author{ margin-top: -1em; }

    you may need to adjust that negative margin a bit until you get it where you like but it should work.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.