May 8 2011

Wordpress Removing Line Breaks Fix 2011

By default Wordpress 3 (and previous versions) removes or filters out the line break (<br />) and paragraph tags (<p>) that you place in your category and tag descriptions.

With many solutions online that no longer work this article is a 2011 fix to prevent wordpress from filtering out the HTML that you place in these descriptions.

Firstly, its a good idea to add unique content to the top in-body text of these pages. It will improve your Google rankings and just makes for good SEO all round. If your not using tags you should consider using them if only for peoples names, an often overlooked and easy source of non competitive traffic. Blogging about the semi-famous and becoming-famous people in your niche not only generates traffic it can also leverage backlinks as these pages become a wiki-like source for information worth linking to.

Now The Fix

  • Find a page in your includes page
    wp-includes/default-filters.php
  • Your looking for a line that includes wpauto
  • In my Wordpress 3.1 this is exactly
    add_filter( $filter, ‘wpautop’          );
  • Comment that line out
    //    add_filter( $filter, ‘wpautop’          );

Let me know if it works for your via a comment below!

TAGS:
blog comments powered by Disqus