Forked from andrewlimaza/move-pass-bemail-pmpro.php
Last active
July 22, 2024 12:13
-
-
Save JarrydLong/f4e93337042046c2edec7f2d67deda32 to your computer and use it in GitHub Desktop.
Move Password div below email div jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PMPro 3.1+ compatible | |
* Small jQuery snippet to move password field below email field for Paid Memberships Pro. | |
* Please note this will affect all instances such as Signup Shortcode, checkout page. | |
* To only load this on a specific page, please use the 'is_page' WordPress function in a condition. | |
*/ | |
function my_move_password_below_bemail() { | |
?> | |
<script> | |
jQuery(document).ready(function(){ | |
jQuery( '.pmpro_form_field-password' ).insertAfter( '.pmpro_form_field-bemail' ); | |
jQuery( '.pmpro_form_field-password' ).insertAfter( '.pmpro_form_field-bconfirmemail' ); | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'my_move_password_below_bemail' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes this is the correct code. Thanks