How to auto create site after user sign up on multisite(network)
How to auto create site after user sign up on multisite(network)
How to auto create site after user sign up on multisite(network)
You can use user_register action for this task. This action fires immediately after a new user is registered. add_action( ‘user_register’, ‘myplugin_registration_save’, 10, 1 ); function myplugin_registration_save( $user_id ) { //Your Code }
You can use the built in wordpress function wp_signon. /// Auto login new user $creds = array(); $creds[‘user_login’] = $username; $creds[‘user_password’] = $userpass; $creds[‘remember’] = true; $user = wp_signon( $creds, false ); if ( is_wp_error($user) ) echo $user->get_error_message(); $username and $userpass would be posted data from your register form. Check the wordpress codex for full … Read more
This assumes that what you said about only needing to check for the minimum value is true. These conditional statements work for this array. Facebook’s Min Age Array will be either 13, 18 or 21. $age_range = array( 13, 18, 21); // I don’t know what actual data you have here. if( min( $age_range ) … Read more
Maybe this plugins can help you https://wordpress.org/plugins/pagerestrict/ https://wordpress.org/plugins/wordpress-access-control/ Update if ( is_user_logged_in() ) { // you content } else { // you text } UPDATE 2 When the user is authorized, him ID was write in global array. This ID you can take from this array. $current_user = wp_get_current_user(); I don’t know structure your table, … Read more
At the top of your index page. You could add. if( isset( $_GET[‘ref’] ) && $_GET[‘ref’] !== ” ) wp_safe_redirect( ‘/signup’ ) Then, on the sign up page add: $the_referer = isset($_SERVER[‘HTTP_REFERER’]) ? $_SERVER[‘HTTP_REFERER’] : ”; So you can do whatever you want with that, I would add some escaping etc and you’ll prob have … Read more
I want to signin from first wordpress site to other wordpress website without registration..without using network mode
Please Use Axios to make Post Request to WordPress. There is only one way to connect with WordPress is API you should create a Post request to WordPress like this axios.post(‘http://your-wordpress-website/api/’,()=>{ })
Using custom IDP with WP
When i try to open Localhost/wordpress/wp-admin . An Error appears ” Registration Has been Disabled” . No login page is shown in the browser