0

Under the login page of Wordpress, I have a message saying:

"Only registered and logged in users are allowed to view this site, please login".

The problem is that I am not running an English installation of WordPress, and that this message is displayed in English.

How can I remove this message or translate it? Under my element inspector, it is appearing like:

<p class="message">Only registered and logged in users are allowed to view this site. Please login now<br></p>

I dont know where the code responsible of generating this, also, if it is a core file, I am avoiding touching it.

Question: How can I use a code in functions.php to hide this message or translate it?

  • 2
    As I just did a cross file search, I can't confirm that this message exists. I as well did a cross file search for the HTML tag with that class and couldn't come up with anything from WP core that is related. Seems like it's a plugin message? – kaiser Jul 27 '13 at 0:31
  • @Kaiser, I totally agree with you, I am using a plugin "Private only" which is responsible of displaying this message, I thought at the beginning it is core message. Thanks for this smart remark. I 'resolved' the problem using accepted answer. – whiteletters in blankpapers Jul 27 '13 at 1:49
1

You can read this article and then get the po an mo files your need to translate wordpress in your language. You can put these files /wp-content/languages/.

This should translate your login page too.

EDIT: if you're stuck with your issue you can hook some styles on login page and add some display none to the class message .message{ display:none!important;}

To do such a thing just write this :

 function custom_login() {
 echo ' <style>
    .message { display:none!important;}
  </style>';
 }
 add_action('login_head', 'custom_login');
  • I already have the po and mo files for that language, also I have wordpress running correcly in that language, front end and back end, except for the given message. Note that in login page I have other messages that are translated. Thanks anyway. – whiteletters in blankpapers Jul 26 '13 at 23:06
  • 1
    I'm editing this – JMau Jul 26 '13 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.