Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JarrydLong/f4e93337042046c2edec7f2d67deda32 to your computer and use it in GitHub Desktop.
Save JarrydLong/f4e93337042046c2edec7f2d67deda32 to your computer and use it in GitHub Desktop.
Move Password div below email div jQuery
<?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' );
@batwomen01
Copy link

batwomen01 commented Jul 22, 2024

Yes this is the correct code. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment