starcontroller
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Comments display as one block of textI’m sorry. I don’t know anything about wrapping classes. How would it be done for comment_text?
Forum: Themes and Templates
In reply to: Comments display as one block of textHello,
I tried
<?php echo get_comment_text(); // no default filters ?>
and it removed all of the paragraph tags, removing all remaining linebreaks, making everything look like a giant paragraph no matter how many times the user added a line break for the comments.
However, I modified your above line of code, which did change all newline characters to tags, which did fix my problem:
<?php echo str_replace("\n","<br />",get_comment_text()); ?>
So, basically it got rid of the paragraph tags but it replaces the newlines
"\n"
with<br />
, which has the same output. It still has the same problem if I changeget_comment_text()
tocomment_text()
. The only downside toget_comment_text()
is that it doesn’t convert web urls in comments to clickable hyperlinks, but this is not an issue for me. I don’t know if it truly follows proper HTML-etiquette, but it’s a nice quickfix for now.Forum: Themes and Templates
In reply to: Comments display as one block of textI have the same issue noted above. There is something about this line:
<?php comment_text() ?>
It encloses each comment line in paragraph tags but it doesn’t add the so everything looks scrunched up.I have tried str_replace to fix this, but it remains unaffected:
<?php echo str_replace("</p>","</p><br />", comment_text()); ?>
I am all out ideas and I am not sure how to fix this either. I have tried other themes and they include the line breaks.I hope this helps explain what the issue is.