{"id":5480,"date":"2020-10-05T13:14:57","date_gmt":"2020-10-05T13:14:57","guid":{"rendered":"https:\/\/shortpixel.com/blog\/?p=5480"},"modified":"2020-10-05T13:14:59","modified_gmt":"2020-10-05T13:14:59","slug":"how-to-remove-capital-p-dangit-filter","status":"publish","type":"post","link":"https:\/\/shortpixel.com\/blog\/how-to-remove-capital-p-dangit-filter\/","title":{"rendered":"What is the capital P dangit filter and how to remove it"},"content":{"rendered":"\n<p><a rel=\"noreferrer noopener\" aria-label=\"Matt Mullenweg (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Matt_Mullenweg\" target=\"_blank\">Matt Mullenweg<\/a> is one of the founders of WordPress (thanks!) and back in 2010 he <a rel=\"noreferrer noopener\" aria-label=\"committed a new piece of code (opens in a new tab)\" href=\"http:\/\/core.trac.wordpress.org\/changeset\/14996\" target=\"_blank\">committed a new piece of code<\/a> to correct automatically every single &#8220;Wordpress&#8221;, without a capital P, to &#8220;<strong>WordPress<\/strong>&#8220;, 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?<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Although that is a very nice initiative, it was not discussed with the community whether the &#8220;WordPress&#8221; word should be auto-corrected or not. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"940\" height=\"788\" src=\"https:\/\/shortpixel.com/blog\/wp-content\/uploads\/2020\/10\/WP.png\" alt=\"capital P dangit\" class=\"wp-image-5541\" title=\"\" srcset=\"https:\/\/shortpixel.com\/blog\/wp-content\/uploads\/2020\/10\/WP.png 940w, https:\/\/shortpixel.com\/blog\/wp-content\/uploads\/2020\/10\/WP-300x251.png 300w, https:\/\/shortpixel.com\/blog\/wp-content\/uploads\/2020\/10\/WP-768x644.png 768w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><\/figure>\n\n\n\n<p>We are not here to make judgments, but to <strong><a href=\"https:\/\/shortpixel.com/blog\/category\/performance\/\">improve the speed of your WordPress<\/a><\/strong>. Since that little piece of code (the filter) is being executed in every single page of your website, we believe <strong>it is better to remove it<\/strong> from your site.<\/p>\n\n\n\n<p>To do this, first open the &#8220;<strong>functions.php<\/strong>&#8221; file of your theme. You should use an FTP client like <a rel=\"noreferrer noopener\" aria-label=\"Filezilla (opens in a new tab)\" href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\">Filezilla<\/a> or log in to your hosting control panel and use their file manager. The file will be located in the path &#8220;\/wp-content\/themes\/your-theme\/&#8221;.<\/p>\n\n\n\n<p>Once you can edit the file, <strong>add the following at the end of the file<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Removing capital P dangit *\/\nremove_filter( 'the_title', 'capital_P_dangit', 11 );\nremove_filter( 'the_content', 'capital_P_dangit', 11 );\nremove_filter( 'comment_text', 'capital_P_dangit', 31 );<\/code><\/pre>\n\n\n\n<p>Save the file and you are done!<\/p>\n\n\n\n<p>Is your website still slow? <a href=\"https:\/\/shortpixel.com\/lp\/wso\/?utm_source=BLOG\">Find out here why.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;Wordpress&#8221;, without a capital P, to &#8220;WordPress&#8220;, with a capital P. Are you curious to know why, if you search in Google for P dangit filter you will find [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":5483,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-5480","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts\/5480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/comments?post=5480"}],"version-history":[{"count":5,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts\/5480\/revisions"}],"predecessor-version":[{"id":5544,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/posts\/5480\/revisions\/5544"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/media\/5483"}],"wp:attachment":[{"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/media?parent=5480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/categories?post=5480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shortpixel.com\/blog\/wp-json\/wp\/v2\/tags?post=5480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}