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

wp-login-form

Redirect user after login/registration globally

This code adapted from: Registration Redirect add_filter( ‘registration_redirect’, ‘ckc_registration_redirect’ ); function ckc_registration_redirect() { return home_url(); } This code adapted from: Login Redirect add_filter( ‘login_redirect’, ‘ckc_login_redirect’ ); function ckc_login_redirect() { // Change this to the url to Updates page. return home_url( ‘/Updates’ ); } Add the code to the functions.php theme (or child theme) file.

Categories redirect Tags login, redirect, user-registration, wp-login-form, wp-redirect

Change Login Page for a Multisite Subsite

You can get the current blog id (which would be the site in a network, your subsite) with get_current_blog_id() and you can get details of a particular site with get_blog_details() from codex: get_blog_details(), passed an id of 1, may return the following object: [blog_id] => 1 [site_id] => 1 [domain] => foo-multi-site.com [path] => /site-path/ … Read more

Categories login Tags login, wp-login-form

Remove built in wordpress login and use only google auth

To remove WP native username/password authentication use the code below. It can be added to the theme (functions.php), to a plugin, or mu-plugin. Just make sure you have another authentication module working before you disable WP native auth. remove_filter(‘authenticate’, ‘wp_authenticate_username_password’, 20, 3);

Categories login Tags login, wp-login-form

WordPress Login Footer URL

Since this is not a standard feature you could achieve this with your own css and js you could add to the page like this <?php function custom_login() { echo ‘<link rel=”stylesheet” type=”text/css” href=”‘.get_bloginfo(‘template_directory’).’/custom-login/custom-login.css” />’; echo ‘<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js”></script>’ echo ‘<script type=”text/javascript” src=”‘. get_bloginfo(“template_url”) . ‘/js/yourScript.js”></script>’; } add_action(‘login_head’, ‘custom_login’); ?> change jquery url as wanted to … Read more

Categories login Tags login, wp-login-form

How to use wp-login.php page only for logout?

WordPress has hooks so you don’t need to actually remove wp-login.php. login_head fires before any HTML is rendered for the login form, and wp_logout fires after the login session has been destroyed. You can put this code in a custom plugin or in your theme’s functions.php file to let logout requests continue working but block … Read more

Categories wp-login-form Tags logout, wp-login-form

How to redirect users to custom lostpassword page?

If you only want to adjust the link of the lost password page, then there is a designated filter for that: function wpse_133647_custom_lost_password_page() { return home_url(‘/lost-password’); } // function wpse_133647_custom_lost_password_page add_filter(‘lostpassword_url’, ‘wpse_133647_custom_lost_password_page’);

Categories PHP Tags functions, php, redirect, wp-login-form

How can I do customizations on login, registration and password recovery forms?

For an general overview about hooks take a look at the codex page about the Plugin API: This article is specifically about the API of “Hooks”, also known as “Filters” and “Actions” Besides that there is valuable information specifically about customizing the login and registration form available at the codex: Customizing the Login Form You … Read more

Categories hooks Tags codex, hooks, login, user-registration, wp-login-form

How to customise wp-login.php only for users who are setting a password for the first time?

You can add an extra help message box, on the reset password screen: with the following: /** * Display an extra help message box on the ‘reset password’ screen * * @link http://wordpress.stackexchange.com/a/204429/26350 */ add_action( ‘validate_password_reset’, function( $errors ) { add_action( ‘login_message’, function( $message ) { // Modify this help message box to your needs: … Read more

Categories login Tags login, password, user-registration, wp-login-form

How to change “Registration complete. Please check your e-mail.” in wp-login.php

After wp-login.php figures out what error messages to display, the $errors object gets passed through the wp_login_errors filter: $errors = apply_filters( ‘wp_login_errors’, $errors, $redirect_to ); When that error message is added to the list of “errors”, wp-login uses the code ‘registered’, which you can use to narrow down your search. So something like this should … Read more

Categories wp-login-form Tags wp-login-form

Action wp_login_failed not working if only one field is filled out

Add this filter to change how blank username/password is treated: add_filter( ‘authenticate’, ‘custom_authenticate_username_password’, 30, 3); function custom_authenticate_username_password( $user, $username, $password ) { if ( is_a($user, ‘WP_User’) ) { return $user; } if ( empty($username) || empty($password) ) { $error = new WP_Error(); $user = new WP_Error(‘authentication_failed’, __(‘<strong>ERROR</strong>: Invalid username or incorrect password.’)); return $error; } … Read more

Categories login Tags actions, login, wp-login-form, wp-redirect
Older posts
Newer posts
← Previous Page1 … Page30 Page31 Page32 … Page35 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