How to remove the WordPress p filter

Since WordPress 3.0 they hided a tricky filter to convert every Word p ress (mind the "p") to WordPress in your content, titles and comments.

I do like it

Yes, I like to write WordPress like it is 🙂

But here comes the problem

Imagine you had a WordPress site with an older version with a link or image pointing to

link

It will transform the text and break the link:

link

Solution

Add the following lines to your functions.php file of your theme:

remove_filter( 'the_content', 'capital_P_dangit' );
remove_filter( 'the_title', 'capital_P_dangit' );
remove_filter( 'comment_text', 'capital_P_dangit' );

About Rick

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*