{"id":72195,"date":"2016-06-17T00:07:18","date_gmt":"2016-06-17T04:07:18","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=72195"},"modified":"2016-07-14T04:37:40","modified_gmt":"2016-07-14T08:37:40","slug":"wordpress-how-to-removechange-protected-prefix-for-password-protected-posts","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/wordpress-how-to-removechange-protected-prefix-for-password-protected-posts.html","title":{"rendered":"WordPress. How to remove\/change &#8220;Protected:&#8221; prefix for password protected posts"},"content":{"rendered":"<p>Hello! This tutorial is going to show you how to <strong>edit or remove the &#8216;Protected&#8217; prefix<\/strong> from password protected posts in WordPress.<\/p>\r\n\r\n <div class=\"video-container\">\r\n\t<iframe src=\"https:\/\/www.youtube.com\/embed\/zJYaQKH8K74\"><\/iframe>\r\n<\/div>\r\n<p>If your post is protected with a password, the specific prefix will be displayed before its title in the blog listing:<\/p>\r\n\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_1-300x113.png\" alt=\"64.Wordpress.How_to_remove_protected_prefix_1\" width=\"300\" height=\"113\" class=\"alignnone size-medium wp-image-72196\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_1-300x113.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_1-150x56.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_1-1024x384.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_1.png 1298w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<ol>\r\n\t<li>\r\n\t\t<p>In order to edit it you need to open your <strong>FTP or File manager<\/strong> tool at the hosting cPanel, then go to <strong>wp-content\/themes\/themeXXXX<\/strong> folder (here XXXX stands for your theme number) and open <strong>functions.php<\/strong> file for editing. You can also reach this file at site Dashboard, at the <strong>Appearance -> Editor<\/strong> section.<\/p>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Add the following code to the end of file:<\/p>\r\n\t\t<pre class=\"brush:php\">\r\n\t\t\t\/**\r\n\t\t\t* Removes or edits the 'Protected:' part from posts titles\r\n\t\t\t*\/\r\n\r\n\t\t\tadd_filter( 'protected_title_format', 'remove_protected_text' );\r\n\t\t\tfunction remove_protected_text() {\r\n\t\t\treturn __('Protected: %s');\r\n\t\t\t}\r\n\t\t<\/pre>\r\n\t\t<p>Here you can also change or remove the &#8220;Protected:&#8221; text if needed.<\/p>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Edit the text and save changes. Then refresh your blog page to see the modifications applied.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_2-300x106.png\" alt=\"64.Wordpress.How_to_remove_protected_prefix_2\" width=\"300\" height=\"106\" class=\"alignnone size-medium wp-image-72197\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_2-300x106.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_2-150x53.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_2-1024x362.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_2.png 1298w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>As you can see, prefix was edited successfully. Let&#8217;s remove it completely. In order to do this, delete the text you don&#8217;t need to appear (but keep the <strong>&#8216;%s&#8217;<\/strong> that stands for title). As a result, your code will appear this way:<\/p>\r\n\t\t<pre class=\"brush:php\">\r\n\t\t\t\/**\r\n\t\t\t* Removes or edits the 'Protected:' part from posts titles\r\n\t\t\t*\/\r\n\r\n\t\t\tadd_filter( 'protected_title_format', 'remove_protected_text' );\r\n\t\t\tfunction remove_protected_text() {\r\n\t\t\treturn __('%s');\r\n\t\t\t}\r\n\t\t<\/pre>\t\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Save changes and check the page once again.The prefix was removed and post&#8217;s title does not differ from the others now.<\/p>\r\n\t\t\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_3-300x110.png\" alt=\"64.Wordpress.How_to_remove_protected_prefix_3\" width=\"300\" height=\"110\" class=\"alignnone size-medium wp-image-72198\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_3-300x110.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_3-150x55.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_3-1024x375.png 1024w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/06\/64.Wordpress.How_to_remove_protected_prefix_3.png 1296w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n\t<\/li>\r\n<\/ol>\r\n\r\n<p>Now you know how to edit or remove the <strong>&#8216;Protected&#8217; prefix<\/strong> from post&#8217;s titles.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=zJYaQKH8K74?width=1280&amp;height=720\" rel=\"prettyPhoto\">WordPress. How to remove\/change &#8220;Protected:&#8221; prefix for password protected posts<\/a>","protected":false},"excerpt":{"rendered":"<p>Hello! This tutorial is going to show you how to edit or remove the &#8216;Protected&#8217; prefix from password protected posts in WordPress.<\/p>\n","protected":false},"author":59,"featured_media":72199,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[728],"tags":[712,2316,1550,2405],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/72195"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/59"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=72195"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/72195\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/72199"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=72195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=72195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=72195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}