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

How to translate “wrong password” message

We can also use the filter wp_login_errors available in wp-login.php to do the above. Using the same filter you can customize other error messages too like registration, checkmail etc. Use the below code in the active theme’s functions.php file add_filter( ‘wp_login_errors’, ‘override_incorrect_password_msg’, 10, 2 ); function override_incorrect_password_msg( $errors, $redirect_to ) { if( isset( $errors->errors[‘incorrect_password’] ) … Read more

Categories login Tags login

Cookie settings for session across WPML subdomains using custom AJAX login

I continued looking for an answer elsewhere, and found one. Basically, the “cookie domain origin policy” was the issue, not sign-in process. I was calling domain.com/wp-admin/admin-ajax.php from a subdomain fr.domain.com. I called fr.domain.com/wp-admin/admin-ajax.php instead, and that worked.

Categories login Tags cookies, login, subdomains

Make wordpress admin failed login attempt return 401

WordPress handles login failed in two ways: If it is a bad credential, and both username and password have a value, then this action can be captured by wp_login_failed If both, or one, of the options are empty, then WordPress generates the error object as the first parameter in the authenticate filter; it does not … Read more

Categories login Tags login, security

wp_login action hook not working

You’re probably running into a problem with $current_user->id being deprecated since WordPress 2.1. Specifically, I get this notice in the error log: Notice: WP_User->id was called with an argument that is deprecated since version 2.1! Use WP_User->ID instead. in /xxx/xxx/public_html/wordpress/wp-includes/functions.php on line 2923. Use $current_user->ID instead. Or you may be able to use get_current_user_id(): add_action( … Read more

Categories login Tags actions, login, publish

Websites defaced by uploading script using theme editor

Now what baffles me is according to logs they all them seem to have logged-in directly to WordPress as if they know the password (since it’s only one login attempt in line 16 above). This is true even for sites only up one day ago and the passwords are not simple ABCs. It is also … Read more

Categories login Tags hacked, login, security

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

What hooks should I use for pre-login and pre-registration actions?

Proper hooks for login and register actions: <?php function custom_plugin_hooks() { add_action( ‘login_form’, ‘custom_plugin_form_inputs’ ); add_filter( ‘authenticate’, ‘custom_plugin_login_check’, 100, 3 ); add_action( ‘register_form’, ‘custom_plugin_form_inputs’ ); add_action( ‘register_post’, ‘custom_plugin_registration_check’, 100, 3); } custom_plugin_hooks(); function custom_plugin_form_inputs() { echo “\n”.'<p>’; echo ‘<label>Custom input: <br />’; echo ‘<input type=”text” name=”custom-input” class=”input” value=”” />’; echo ‘</label></p>’.”\n”; } function custom_plugin_login_check($user, $username, … Read more

Categories login Tags login, user-registration

Send reset password link to user from custom lost password form

In your plugin you would first set the redirect URL either to nothing: $redirect=””; or the fully qualified URL of the page you want your user to land on after successfully changing their password. For http://example.com/mypage/ you would use: $redirect=site_url( ‘/mypage/ ‘ ); Then your form would be: <form name=”lostpasswordform” id=”lostpasswordform” action=”<?php echo wp_lostpassword_url(); ?>” … Read more

Categories login Tags buddypress, login, password

Give visitor access to password protected page/post via external script

Finally, I found the solution: form.php <form action=”<?php echo bloginfo(‘template_directory’); ?>/pp-redirect.php” method=”post”> Event: <input name=”event” type=”text” size=”25″ /><br /> Passwort: <input name=”post_password” type=”password” size=”25″ /><br /> <input name=”submit” type=”submit” value=”Los” /> </form> pp-redirect.php <?php /** Make sure that the WordPress bootstrap has run before continuing. */ require( dirname(__FILE__) . ‘./../../../wp-load.php’); global $wp_hasher; if ( empty( … Read more

Categories login Tags login, password, remote-login
Older posts
Newer posts
← Previous Page1 … Page65 Page66 Page67 … 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