Bubbles00
Member
Posted 4 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.
1. Flagged for codex
2. Search here for 'autop'
Bubbles00
Member
Posted 4 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 ?
Bubbles00
Member
Posted 4 years ago #
sorry its
add_filter('the_content', 'wpautop');
add_filter('the_excerpt', 'wpautop');
at 2 places actually...
Bubbles00
Member
Posted 4 years ago #
I fixed it :) thanks! I just removed
add_filter('the_content', 'wpautop');
from that file...thanks again :D
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)
weschilders
Member
Posted 4 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
weschilders
Member
Posted 4 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