How to set up User email verification after Signup?

You can use user_register hook add_action( ‘user_register’, ‘my_registration’, 10, 2 ); function my_registration( $user_id ) { // get user data $user_info = get_userdata($user_id); // create md5 code to verify later $code = md5(time()); // make it into a code to send it to user via email $string = array(‘id’=>$user_id, ‘code’=>$code); // create the activation code … Read more

How to limit user registration to a specific set of domains?

You can do it easily by writing a code inside your theme’s functions.php file. here is the code: function is_valid_email_domain($login, $email, $errors ){ $valid_email_domains = array(“gmail.com”,”yahoo.com”);// whitelist email domain lists $valid = false; foreach( $valid_email_domains as $d ){ $d_length = strlen( $d ); $current_email_domain = strtolower( substr( $email, -($d_length), $d_length)); if( $current_email_domain == strtolower($d) ){ … Read more

Placeholder text for registration form

Another simple way to do this without needing to add another script is using PHP’s str_replace function. $args = array( ‘echo’ => false, ); $form = wp_login_form( $args ); //add the placeholders $form = str_replace(‘name=”log”‘, ‘name=”log” placeholder=”Username”‘, $form); $form = str_replace(‘name=”pwd”‘, ‘name=”pwd” placeholder=”Password”‘, $form); echo $form;

Unregister Nav Menu from Child-Theme

The Starkers theme setup is hooked to after_setup_theme, at a priority of 10. So you basically have to wrap the unregister function inside another function (child themes functions.php file) and add it later than the parent themes setup function, so it gets first added by the parent and later on removed by the child. function … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)