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

Adding extra authentication field in login page

First of all, I would advise against editing the core files as it will be overwritten when you next update WordPress. Also, you should update WordPress, because it will often include security updates. (It’s recently been reported that there has been a spate of attacks on sites using outdated WordPress versions) In order to achieve … Read more

Categories login Tags authentication, customization, login

wp_signon returns user, but the user is not logged in

get_currentuserinfo() didn’t work for me. I’ve written about this problem and solution at my blog: http://blog.rhysgoodwin.com/programming/wordpress-wp_signon-current_user-is-not-populated/ Cheers, Rhys

Categories login Tags login

How to prefill the username/password fields on the login page

The Result Username You can declare the form field value global and prefill it. This will override any setting done via the “Remember me”-Checkbox. /** * Changes the default user name to “DEMO” * * @return string $user_login */ function login_form_username() { global $user_login; return $user_login = ‘DEMO’; } add_action( ‘login_head’, ‘login_form_username’ ); Password I … Read more

Categories login Tags login

Custom login form

The login form is a simple html form sending username and password to wp-login.php. This is the simplest way to create a custom login form: <?php $redirect_to = ”; ?> <form name=”loginform” id=”loginform” action=”<?php echo site_url( ‘/wp-login.php’ ); ?>” method=”post”> <p>Username: <input id=”user_login” type=”text” size=”20″ value=”” name=”log”></p> <p>Password: <input id=”user_pass” type=”password” size=”20″ value=”” name=”pwd”></p> <p><input … Read more

Categories login Tags login, wp-login-form

What is $interim_login?

The variable $interim_login is TRUE when the log-in session of a user expires while she is working in the back end, for example during an auto-save action. In this case a message asking to log in again appears at the bottom of the editor: The same can happen in the theme customizer. The $_REQUEST variable … Read more

Categories login Tags authentication, login

How to show ‘login error’ and ‘lost password’ on my template page?

Yes it’s possible. You have to create three filters for this. Admin stuff inside a class class WPSE29338_Admin { public static function setup() { add_filter(‘login_url’, array(__CLASS__, ‘modifyLoginURL’), 10, 2); add_filter(‘lostpassword_url’, array(__CLASS__, ‘modifyLostPasswordURL’), 10, 2); add_filter(‘register’, array(__CLASS__, ‘modifyRegisterURL’)); } public static function modifyLoginURL($loginUrl, $redirect=””) { $loginUrl = site_url(‘login’); // Link to login URL if(!empty($redirect)) { $loginUrl … Read more

Categories login Tags front-end, login

Removing username from the ‘wordpress_logged_in’ cookie

Short introduction After quick look inside WP source code, I think I’ve found solution… WordPress uses two functions to set and parse auth cookies: wp_generate_auth_cookie wp_parse_auth_cookie There is a filter in wp_generate_auth_cookie called auth_cookie which you probably could use to change the contents of cookie, but there is no filter inside wp_parse_auth_cookie, but… Both of … Read more

Categories login Tags cookies, login, session

‘Password field is empty’ error when using autofill in Chrome

The JavaScript function wp_attempt_focus is causing this issue. The function fires shortly after page load, clears the form and focuses on it, forcing users to manually enter their login information. Chrome is filling in the username and password automatically, just milliseconds before the JS function clears the field. Chrome does not properly pick up the … Read more

Categories login Tags errors, google-chrome, login

I can’t access my site via wp-admin

Try disabling all your plugins by moving or deleting them from your /wp-content/plugins/ folder. Do this by FTP or by your host’s control panel. If this doesn’t work, log in to the server via FTP, and upload a fresh copy of WordPress. This will fix your wp-admin, and any other folders or files that have … Read more

Categories login Tags login

Disallow user from editing their own profile information

great answer, to take this a step further and for anyone looking to apply this to all non-admin users (e.g. contributers, editors etc.) // ===== remove edit profile link from admin bar and side menu and kill profile page if not an admin if( !current_user_can(‘activate_plugins’) ) { function mytheme_admin_bar_render() { global $wp_admin_bar; $wp_admin_bar->remove_menu(‘edit-profile’, ‘user-actions’); } … Read more

Categories login Tags login, profiles, user-roles
Older posts
Newer posts
← Previous Page1 … Page72 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