Registration Form Shortcode

do_action(‘register_form’); doesn’t echo the form. It runs inside the form. You can use it to add information or maybe alter some values… maybe. So the answer is that you can’t insert the registration form with that mechanism. And while there are function in wp-login.php, the form isn’t one of them. What you probably want is … Read more

How to redirect new WordPress user to previous page after registering

There’s a registration_redirect filter you can use: add_filter( ‘registration_redirect’, ‘wpse_129618_registration_redirect’ ); function wpse_129618_registration_redirect( $redirect ) { if( isset( $_SERVER[‘HTTP_REFERER’] ) && 0 != strlen( $_SERVER[‘HTTP_REFERER’] ) ) { $redirect = esc_url( $_SERVER[‘HTTP_REFERER’] ); } return $redirect; } Alternately, you can edit the PHP that is generating your <form> and add a hidden field named redirect_to, … Read more

Including the necessary functions for a custom ajax registration form

Here is a basic setup that I use for AJAX with WordPress. instead of loading wp-load.php on a separate php file; just use WordPress default method for AJAX calls. This allows you to also filter function calls from Javascript through a switch. I also added a quick example for wp_localize_script. <?php add_action(‘wp_enqueue_scripts’, ‘YOUR_NAME_scripts’); //back end … Read more

Mobile User Registration

New users CAN be allowed to register remotely without setting “anyone can register” in “general/settings”. The client is android and in addition to the android java client code using the ‘org.xmlrpc library’, the following was added to ‘functions.php’ in the child theme: function xml_add_method( $methods ) { $methods[‘xxx.wp_create_user’] = ‘xxx_wp_create_user’; return $methods; } add_filter( ‘xmlrpc_methods’, … Read more

How to stop WordPress emailing a password

It looks like you’re calling wp_new_user_notification() explicitly in your code snippet. Here are two ideas, how you could get around this problem: Idea 1: The wp_new_user_notification() function is pluggable, so you can modify it to your needs. You could for example, override it with: if ( ! function_exists( ‘wp_new_user_notification’ ) ): function wp_new_user_notification( $user_id, $plaintext_pass=”” … Read more