Change Membersip field placeholder

Is it possible to replace text input placeholder in Membership 2 Pro login form.

  • Ash
    • WordPress Hacker

    Hello Peter

    You can use shortcode attributes to change the placeholders. Please try like this:

    [ms-membership-login label_username="custom username" label_password="custom password"]

    Hope it helps! Please feel free to ask more questions if you have any.

    Have a nice day!

    Cheers,
    Ash

  • Rupok
    • Support Ninja

    Hi Peter,

    Thanks for asking. It's also possible with a little custom coding besides the method Ash provided above. Can you please try the following code Ari provided? For using this, you might need to create an MU Plugin. For creating an MU Plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    add_filter('ms_controller_shortcode_membership_login_atts', function($data) {
    $data['label_username'] = 'Your Custom User Name';
    $data['label_password'] = 'Your Custom password label';
    return $data;
    });
    ?>

    For getting more idea on mu-plugins, you can go through this article: http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    It worked on my test site. So it should work on your site too. Please let us know if this doesn't work for you by any chance. We will be very glad to help further.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.