0

enter image description here I want to change "Reset password" text on submit button to "Set password"

How can I change it?

I tried to change value with jQuery:

    add_action( 'resetpass_form', 'resettext');
    function resettext(){ ?>

    <script type="text/javascript">                 
            jQuery('#resetpassform input#wp-submit').val("Set Password");
    </script>
    <?php
    }

But it didn't work, I don't know why

  • Hi danibeiss, could you provide more details on what you've tried already (and why it didn't work)? – kraftner Feb 17 '16 at 8:08
2

I've added

jQuery( document ).ready(function() {

and it works! Final working code below:

add_action( 'resetpass_form', 'resettext');
function resettext(){ ?>

<script type="text/javascript">
   jQuery( document ).ready(function() {                 
     jQuery('#resetpassform input#wp-submit').val("Set Password");
   });
</script>
<?php
}

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.