Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

login

Check for correct username on custom login form

The code he posted in that tutorial (very nice BTW) post’s the form to the build-in “reset password” module which redirects to the login.php on error, but you can change that and build your own based on the original and add it to the template page, change: <form method=”post” action=”<?php echo site_url(‘wp-login.php?action=lostpassword’, ‘login_post’) ?>” class=”wp-user-form”> … Read more

Categories login Tags forms, login, password, Reset

How to prefill WordPress registration with social details

I’d recommend Auth0 plugin https://wordpress.org/plugins/auth0/ oAuth plugins should auto populate the data that your API call allows. And your users should be able to edit their profiles also. LinkedIn also has an AutoFill function here: https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/plugins/autofill-plugin

Categories login Tags login, social-connect, user-registration

How reduce wordpress login session timeout time?

You just need to add your filter hook like this: function myplugin_cookie_expiration( $expiration, $user_id, $remember ) { return $remember ? $expiration : 600; } add_filter( ‘auth_cookie_expiration’, ‘myplugin_cookie_expiration’, 99, 3 ); You can add it to your theme’s functions.php file.

Categories login Tags login, logout, session

Preventing session timeout

By default, WordPress makes your login session cookie expire in 48 hours (or on browser close), or 14 days if you check the “Remember Me” box. Maybe you have some plugins which force your login cookie to expire. You could manually add the code below on your functions.php to extend your cookie expiry to whatever … Read more

Categories login Tags login, session

SSO / authentication integration with external ‘directory service’

OK, the approach that’s working for me is as follows: Assume that the main site user database is authoritative. The main site login cookie contains an ID and a hash of the site password. Get the cookie from the main site and revalidate it against the main site’s authentication API If valid, use the email … Read more

Categories login Tags login, rest-api, single-sign-on, user-registration, xml-rpc

Separate registration and login for different roles

Creating two separate registration for different roles is easy: //create a hidden field for role add_action(‘register_form’,’add_hidden_role_field’); function add_hidden_role_field(){ if (isset($_GET[‘role’])){ echo ‘<input id=”user_email” type=”hidden” tabindex=”20″ size=”25″ value=”‘.$_GET[‘role’].'” name=”role”/>’; } } add_action(‘user_register’, ‘update_role’); //save the the role function update_role($user_id, $password=””, $meta=array()) { if (isset($_POST[‘role’])){ $userdata = array(); $userdata[‘ID’] = $user_id; $userdata[‘role’] = $_POST[‘role’]; //only allow if … Read more

Categories login Tags login, user-registration, user-roles

Login page ERROR: Cookies are blocked due to unexpected output

This error is generated in wp-login.php , it happens if server is unable to set cookies, this can happen due to several reasons, one of the common issue is: output being sent before setting up of cookies. Try out following options: Update WordPress core, if it is not up to date change theme, if you … Read more

Categories login Tags cookies, login, wp-config

Increase of failed login attempts, brute force attacks? [closed]

There is currently a botnet active, attacking WordPress and Joomla sites. And probably more. You should see more blocked logins. If you don’t, there is probably something wrong. But be aware, blocking IP addresses doesn’t help against a bot net with more than 90,000 IP addresses. And if you do that per plugin avoid Limit … Read more

Categories login Tags login, security

How can I redirect user after entering wrong password?

wp_login_form() creates a form with an action attribute of site_url/wp-login.php, which means that when you click the submit button the form is posted to site_url/wp-login.php which ignores redirect_to on errors (like wrong password) so in your case either go back to using a plugin or recreate the whole login process and that way you will … Read more

Categories login Tags login, wp-login-form

How to login with email only no username?

Update: I have created a plugin for login, registration and retrieve password with email. https://wordpress.org/plugins/smart-wp-login/ Answer in short, you can configure WordPress to login with email. Three Steps: Remove default authentication function Add custom authentication function Change text “Username” in wp-login.php to “Email” One Note: Don’t edit core files. Remove WordPress default authentication function. WordPress … Read more

Categories login Tags email, login
Older posts
Newer posts
← Previous Page1 … Page73 Page74 Page75 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress