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

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

1 Answer 1

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 and acknowledge you have read our privacy policy.

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