Forums

Remove <p> tag attached to comment tags (8 posts)

  1. crimsonwish0216
    Member
    Posted 2 weeks ago #

    Hi,

    I'm posting pages using html, and it seems that Wordpress automatically adds <p> tags to my comment tags. As a result, it changes the way how the html should look.

    Does anyone know how can I NOT let Wordpress do that?

    Any advice is appreciated.

  2. apljdi
    Member
    Posted 2 weeks ago #

    What do you mean by 'comment tag'?

  3. crimsonwish0216
    Member
    Posted 2 weeks ago #

    By comment tag, I meant the html that looks like this:

    <!-- comment -->

    When I post this in Wordpress and check the page's source on the browser, it shows:

    <!-- comment --></p> or sometimes <p><!-- comment -->

  4. apljdi
    Member
    Posted 2 weeks ago #

    Check that your theme isn't adding the <p> tags. If not its probably the comment_text filter. But why not just style the <p> tags the way you want them and be done with it?

  5. crimsonwish0216
    Member
    Posted 1 week ago #

    Hi, thanks for your reply.

    I'm new to this so I'm not sure what you're getting at... where do I check that the theme isn't adding the <p> tags? If not, what do I do to the comment_text filter? And where is it??

    If would style the <p> tags, do I do it somewhere in the template css?

  6. apljdi
    Member
    Posted 1 week ago #

    I would say start with trying to style the <p> tags. You'll need to edit the theme's css file, as you guessed. There should be a style.css in your theme. An URL would help a lot.

  7. crimsonwish0216
    Member
    Posted 1 week ago #

    Beautiful.

    Found where to style the <p> tag in the template css; I changed its line height to 100% so it won't affect how the site should look.

    Thanks again for your help.

  8. apljdi
    Member
    Posted 1 week ago #

    That <p> tag is going to show up a lot on the site. You might need to target your style to just the p tags associated with the comments.

Reply

You must log in to post.

About this Topic