WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove Paragraph tags? (8 posts)

  1. Varsity
    Member
    Posted 8 years ago #

    I'm trying to remove the gap between a post's title and body, and reduce the gap between the body and postmetadata. The problem is the paragraph tags WP automatically inserts, which add line breaks.

    I'm currently giving the entry div negative margins, which works in normal browsers but makes IE suffer a nervous breakdown, as you can see in the link below. Is there a cleaner way of doing things? I would rather not remove the paragraph tags outright. :-)

    Link: http://www.steamreview.org

  2. moshu
    Member
    Posted 8 years ago #

    Seeing it in FF it's already quite crowded :(
    Header tags (h1, h2 etc.) and paragraphs as well always have "automatic" top and bottom margins Why not try to play with those?

  3. Varsity
    Member
    Posted 8 years ago #

    That's the first thing I tried. It also removes the gaps in between each para!

    It looks like I'm going to have to do without the paragraph tags, or at the very least change them from wrapping around the chunk of text to a single <p /> in between. Is that possible?

  4. Austin Matzko
    Member
    Posted 8 years ago #

    Varsity, I recommend you try the Text Control plugin. It lets you control how WordPress adds markup like <p> tags.

  5. Varsity
    Member
    Posted 8 years ago #

    Great, I've got it working with nl2br! Only problem is that it puts brs in EVERYWHERE, including places where they aren't wanted, like at the end of every list item. Is that fixable?

  6. Austin Matzko
    Member
    Posted 8 years ago #

    I just turn off the formatting completely and put <p> tags where I want them.

  7. Varsity
    Member
    Posted 8 years ago #

    That's an option I suppose...

  8. /wp-includes/default-filters.php

    Remove this line:

    add_filter('the_content', 'wpautop');

Topic Closed

This topic has been closed to new replies.

About this Topic