If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

WordPress. How to remove/change “Protected:” prefix for password protected posts

Hello! This tutorial is going to show you how to edit or remove the ‘Protected’ prefix from password protected posts in WordPress.

If your post is protected with a password, the specific prefix will be displayed before its title in the blog listing:

64.Wordpress.How_to_remove_protected_prefix_1

  1. In order to edit it you need to open your FTP or File manager tool at the hosting cPanel, then go to wp-content/themes/themeXXXX folder (here XXXX stands for your theme number) and open functions.php file for editing. You can also reach this file at site Dashboard, at the Appearance -> Editor section.

  2. Add the following code to the end of file:

    			/**
    			* Removes or edits the 'Protected:' part from posts titles
    			*/
    
    			add_filter( 'protected_title_format', 'remove_protected_text' );
    			function remove_protected_text() {
    			return __('Protected: %s');
    			}
    		

    Here you can also change or remove the “Protected:” text if needed.

  3. Edit the text and save changes. Then refresh your blog page to see the modifications applied.

    64.Wordpress.How_to_remove_protected_prefix_2

  4. As you can see, prefix was edited successfully. Let’s remove it completely. In order to do this, delete the text you don’t need to appear (but keep the ‘%s’ that stands for title). As a result, your code will appear this way:

    			/**
    			* Removes or edits the 'Protected:' part from posts titles
    			*/
    
    			add_filter( 'protected_title_format', 'remove_protected_text' );
    			function remove_protected_text() {
    			return __('%s');
    			}
    		
  5. Save changes and check the page once again.The prefix was removed and post’s title does not differ from the others now.

    64.Wordpress.How_to_remove_protected_prefix_3

Now you know how to edit or remove the ‘Protected’ prefix from post’s titles.

Feel free to check the detailed video tutorial below:

WordPress. How to remove/change “Protected:” prefix for password protected posts