[Membership 2 Pro] MemberShip2 Pro

Problem A. Remove this message (Please log in to access this page.)
Problem B. Would like change Login field information, how can do it?
1. usewname change to usewname ???
2. Password change to Password ??

URL: http://amway.lotustours.com.hk/protected-content

  • Adam Czajczyk

    Hello Bobby Chung

    I hope you're well today and thank you for your question!

    Problem A. Remove this message (Please log in to access this page.)

    You can remove that message with an additional CSS:

    .ms-protected-content .ms-auth-header {display:none;}

    To apply it to your site either add it to the "style.css" file of your child-theme (if you are using a child-theme) or via "Appearance -> Customize -> Additional CSS" option or via some "custom css" option of the theme settings (if there is such an option). It will hide the message.

    Problem B. Would like change Login field information, how can do it?
    1. usewname change to usewname ???
    2. Password change to Password ??

    I believe that some characters got corrupted during posting here and replaced with question mark but after looking at your site I believe you want to make those "Username" and "Password" labels bi-lingual, just like menu on the left is, right?

    I'd go with an additional code snippet:

    <?
    function wpmu_ms_login_form_placeholder() {
        ?>
        <script type="text/javascript">
        jQuery(function($) {
             $('.ms-form-login .login-username input').attr("placeholder", "PLACEHOLDER 1");
    	     $('.ms-form-login .login-password input').attr("placeholder", "PLACEHOLDER 2");
    
        });
        </script>
        <?php
    }
    add_action('admin_footer', 'wpmu_ms_login_form_placeholder');

    To apply it to your site:

    1. replace PLACEHOLDER 1 and PLACEHOLDER 2 in the code above with the text you want to use instead of current "Username" and "Password" respectively (1st one is for username and 2nd one for password)

    2. create an empty file with a .php extension (for example "ms-login-form-placeholders.php")

    3. put that entire code into this file and save it; use some "clean text" editor (like Notepad++, Sublime or similar)

    4. upload the file to the "/wp-content/mu-plugins" folder of your WordPress install on the server (via FTP or cPanel "File Manager); if there's no "mu-plugins" folder inside "wp-content" folder just create an empty one.

    I hope that helps :slight_smile:

    Best regards,
    Adam

  • Bobby Chung

    Hi Adam,

    Thanks for your suggestion.

    Problem A is solved but problem B still in trouble. I have already created a php file and paste the content that you provided. There's no "mu-plugins" folder so I create myself (image "q1.png":wink:. However the placeholder values did not changed (image "q2.png" red square).

    Apart from that, I would like to ask one more. How can I change the title and button content (image "q2.png" blue square)? e.g. "Your account" change to "Your account ????", "Log In" change to "Log In ??".

    Thank you.

  • Adam Czajczyk

    Hello Bobby Chung,

    Thanks for your response and sharing the screenshots.

    The location of "mu-plugins" folder should be

    /wp-content/mu-plugins

    and not

    /wp-content/plugins/mu-plugins

    Would you please move that folder (along with the file inside) to the correct location and check the site again? That should make it work for placeholders. The MU Plugins ("Must use" plugins or "site specific plugins") are always automatically executed but for this to happen they must reside inside the

    /wp-content/mu-plugins

    folder :slight_smile:

    Apart from that, I would like to ask one more. How can I change the title and button content (image "q2.png" blue square)? e.g. "Your account" change to "Your account ????", "Log In" change to "Log In ??".

    You can actually do this by expanding the code (the one that goes to mu-plugins) a bit, with just two additional lines. Below is an updated code:

    <?
    function wpmu_ms_login_form_placeholder() {
        ?>
        <script type="text/javascript">
        jQuery(function($) {
             $('.ms-form-login .login-username input').attr("placeholder", "USERNAME PLACEHOLDER");
    	     $('.ms-form-login .login-password input').attr("placeholder", "PASSWORD PLACEHOLDER");
    		 $('.ms-membership-form-wrapper legend').html("YOUR ACCOUNT NEW TEXT");
    		 $('.ms-form-login .login-submit .button-primary').val("NEW LOGIN TEXT");
    
        });
        </script>
        <?php
    }
    add_action('admin_footer', 'wpmu_ms_login_form_placeholder');

    Simply replace the code I shared previously with this one and set your own text in it and that should do the trick.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.