WordPress.org

Ready to get started?Download WordPress

Forums

Removing the <P> from posts...arghh! (8 posts)

  1. Bubbles00
    Member
    Posted 9 years ago #

    Hey! I knwo it will ound silly but really I need help, I want to remove the from the beginning of all my posts..it makes my layout look ugly with a huge gap between header and the blog...what do I do? Where can I remove it ..in which file? Please help, I tried to remove all 's from wp-includes/template-functions-post.php but the is still there...please help. Thanks.

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    1. Flagged for codex

    2. Search here for 'autop'

  3. Bubbles00
    Member
    Posted 9 years ago #

    ok I found 'autop'

    add_filter('the_excerpt', 'wpautop');

    its in wp-includes/template-functions-post.php

    so what do I do with it? Should I delete that line ?

  4. Bubbles00
    Member
    Posted 9 years ago #

    sorry its

    add_filter('the_content', 'wpautop');

    add_filter('the_excerpt', 'wpautop');

    at 2 places actually...

  5. Bubbles00
    Member
    Posted 9 years ago #

    I fixed it :) thanks! I just removed

    add_filter('the_content', 'wpautop');

    from that file...thanks again :D

  6. tr909
    Member
    Posted 9 years ago #

    With WordPress 1.5 i saw that the_content(); function calls
    get_the_content(); and after that calls apply_filters();

    Instead of editting (hacking) includes you can use:
    echo get_the_content() for raw post data in your
    index.php (or pages/categories etc.)
    (please correct me if i'm wrong in this)

  7. weschilders
    Member
    Posted 9 years ago #

    Can I do the same thing with custom fields?

    add_filter('customfieldname', 'wpautop');

    Is there a similar function to add the nl2br filter?

    Wes

  8. weschilders
    Member
    Posted 9 years ago #

    I found the answer I was looking for and thought it should be noted here for future reference, Turns out that the wpautop or nl2br functions needed to be added to the getcustom plugin I was using to call custom fields. See the plugin creator's comment post here.

    Wes

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.