If you are looking to change "This content is password protected..", "Password" and "Enter" text for protected posts/Pages, add this sample code in a Code Snippet and modify as needed:

add_filter( 'the_password_form', 'custom_password_form' );
function custom_password_form( $output ) {	
	$original_strings = array( 'This content is password protected. To view it please enter your password below:', 'Password:', 'Enter' );
	$translated_strings = array( 'Este contenido está protegido por contraseña. Para verlo introduce tu contraseña a continuación:', 'Contraseña:', 'ENTRAR' );
	
	return str_replace( $original_strings, $translated_strings, $output );
}

Before:

After:

For full control the entire form's HTML could be changed, like this.

References

https://wordpress.org/support/topic/how-to-change-the-warning-text/#post-11059203

https://diythemes.com/thesis/rtfm/password-protected-form/

Need help implementing a tutorial in your site or want to hire me for custom work?

HIRE ME

Find the article helpful and wish to donate?

DONATE

Comments

You need to be logged in to view and post comments.
Not a member yet? Join here.
magnifiercross
>
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: