Remove extra line breaks in WordPress
If you like this post, please subscribe to our RSS feed to read our new posts every day.
This is for me to remember, but can be useful to others as well. It took me almost a half hour to hunt down and I dont want to have to hunt it down again!
Find this line in your b2functions.php (inside your b2-include folder):
function wpautop($pee, $br=1) {
Replace it with:
function wpautop($pee, $br=0) {
And no more extra line breaks!
Visitors who read this post, also read:
Related posts from the past
- Budget Launches Blog-Based Treasure Hunt
- WordPress/b2 Hack - Ping Blogrolling.com
- Blogroll import OPML bug in WordPress 0.72
- CSS for code: Wrap long lines
- Ping PubSub from your WordPress or Moveable Type blog
- If, Then, Else
- 404 Search function for WordPress
- Charity Event: WordPress Scavenger Hunt 2008
- WordPress Visual Editor - Do you Use It?
- Simple news feed for links list in WordPress













Comments RSS
Line Breaks
Speak Stiltedly and Wear a Yellow Shirt — 06/4/2004 @ 12:28 pmWrestling with legacy linebreaks from Blogger and MovableType in WordPress 1.2.
This function makes it impossible to display multiple images next to each other in a post, as it inserts line breaks in between each one. This fixed the problem, I’m really glad you found it, I was looking for it for a while and couldn’t find it.
It took me a while to find your post also, I was looking for something to do with line breaks and img tags, I didn’t realize that this one massive function handles all of this stuff.
The only difference now is that it’s now in functions-formatting.php inside the wp-includes (in wp mingus).
[Reply]
paul (1 comments.) — 08/28/2004 @ 5:35 pmThis post is definitely most useful. I was having an issue where kept showing up in my posts when I was doing a (using plugin exec_php) and this completely solved the problem.
[Reply]
Jack Po (1 comments.) — 04/5/2006 @ 5:00 pm