How to Disable the ‘Capital P Dangit’ Filter in WordPress

Matt Mullenweg is one of the founders of WordPress (thanks!) and back in 2010 he committed a new piece of code to correct automatically every single “Wordpress”, without a capital P, to “WordPress“, with a capital P. Are you curious to know why, if you search in Google for P dangit filter you will find almost 1.5 million results?

Although that is a very nice initiative, it was not discussed with the community whether the “WordPress” word should be auto-corrected or not.

We are not here to make judgments, but to improve the speed of your WordPress. Since that little piece of code (the filter) is being executed in every single page of your website, we believe it is better to remove it from your site.

To do this, first open the “functions.php” file of your theme. You should use an FTP client like Filezilla or log in to your hostingHosting Hosting is the service that allows you to store your website online so that others can access it. It's like renting a space on the internet to make your site available 24/7. control panel and use their file manager. The file will be located in the path “/wp-content/themes/your-theme/”.

Once you can edit the file, add the following at the end of the file:

/* Removing capital P dangit */
remove_filter( 'the_title', 'capital_P_dangit', 11 );
remove_filter( 'the_content', 'capital_P_dangit', 11 );
remove_filter( 'comment_text', 'capital_P_dangit', 31 );

Save the file and you are done!

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *