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

Redirect when accessing /login when logged in

I advice you to try this, better to the action login_init: add_action(‘login_init’, ‘redirect_logged_in_user’); function redirect_logged_in_user() { global $action; /* if the user call logout and is not logged in we do nothing*/ if (‘logout’ === $action || !is_user_logged_in()) { return; } /* we redirect logged in people*/ wp_redirect(‘http://my_homepage_url’); exit; }

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

Change the user_login at registration

You can hook into the user_register action hook and lower case the strings manually, by using the wp_update_user function. Here’s a quick example: add_action( ‘user_register’, ‘callback_function’, 10, 1 ); function callback_function( $user_id ) { // Get the user by their ID $user = get_user_by( ‘id’, $user_id ); // Update their user_login wp_update_user( array( ‘ID’ => … Read more

Categories users Tags login, users

How can I find the login page? It was lost after moving the site

I know this thread is a little bit old, but as I spent 3 days installing, “up/down” VPS and searching Google, today I could find an answer to this error. On your WordPress installation root folder, find and open wp-login.php file. Search for the line $user = wp_signon(”, $secure_cookie); and replace the empty string ‘ … Read more

Categories login Tags errors, login

Custom login message for single post pages only

The problem here is a misunderstanding of what is_single means, reading the docs clarifies this: https://developer.wordpress.org/reference/functions/is_single/ Is the query for an existing single post? Description Works for any post type, except attachments and pages If the $post parameter is specified, this function will additionally check if the query is for one of the Posts specified. … Read more

Categories login Tags login

Unable to login, old site with previous developer gone

Two ways you can reset if you remember email address ( admin email ) you can simply click on forgot password and enter there relevant email address and there you’ll get reset link. If you have database access like phpmyadmin follow steps below: login to phpmyadmin find your site’s database. ( e.g., wp_dbname ) find … Read more

Categories admin Tags admin, login

wp-admin folder, brute force, and password protection

Protecting only wp-admin won’t help a lot, at least it won’t protect your from brute-force attacks. A brute force attack is a trial-and-error method used to obtain information such as a user password or personal identification number (PIN). In a brute force attack, automated software is used to generate a large number of consecutive guesses … Read more

Categories login Tags login, security

How to change login labels

All of these strings/labels are passed through translation functions, so you can use gettext filter to modify them. function change_labels( $translated_text, $text, $domain ) { if ( ‘Username’ === $text ) { $translated_text=”Username new label”; } return $translated_text; } function register_change_label_filter() { add_filter( ‘gettext’, ‘change_labels’, 20, 3 ); } add_action( ‘login_head’, ‘register_change_labels_filter’ ); // this … Read more

Categories functions Tags functions, login, templates, wp-login-form

WordPress custom login form using Ajax

A few issues I can see but no guarantee it’ll entirely fix the problem(s) – can you ensure WP_DEBUG and WP_DEBUG_LOG are defined as true in your wp-config.php – any errors during runtime should then appear in wp-content/debug.log. You have ! isset( $_POST ) as a conditional to check the request, but this will always … Read more

Categories PHP Tags login, php, security

Why is my staging subdomain not sending wordpress_logged_in cookies?

I noticed that the staging environment had different content in its wp-config.php and .htaccess files. I changed them to be closer to the ones on the live environment. While I was there, I noticed that some of the differing content was related to various caching plugins that we previously had installed on the staging environment. … Read more

Categories plugins Tags clone-site, cookies, login, plugins, staging

Login error redirecting to wp-login page

You may want to checkout wp_signon as that function can provide a WP_Error object with the appropriate error messages on login failure.. the only drawback is that you will have to create your own form or replace the action url on demand. A somehow basic login function can be implemented like this: if (!function_exists(‘custom_login_function’)) { … Read more

Categories login Tags login, wp-login-form
Older posts
Newer posts
← Previous Page1 … Page116 Page117 Page118 … Page164 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