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 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

Enqueue a stylesheet for login page and make it appear in head element

For every enqueue action, there is a corresponding print_styles action: wp_enqueue_scripts → wp_print_styles admin_enqueue_scripts → admin_print_styles customize_controls_enqueue_scripts → customize_controls_print_styles Not for the login page. There is no login_print_styles action or function, so your stylesheets are thrown out on do_action( ‘login_footer’ );. But there is a simple fix: if ( ! has_action( ‘login_enqueue_scripts’, ‘wp_print_styles’ ) ) … Read more

Categories theme-development Tags css, login, theme-development, wp-enqueue-style

How to Change the Default Home Page for the WordPress Dashboard?

Easy enough, decided to just do the redirect option. I used the wp_login action hook. You could also probably use this for redirecting your users to ANY page on your website. You can also check user capabilities from the $user Object passed in as a function parameter if you want to send different user levels … Read more

Categories admin Tags admin, authentication, dashboard, login, wp-admin

Is there a is_user_logged_in() for multisite?

Yes, and no! The way users work in a multisite scenario is that there is a single pool of users, who are then associated with blogs. So, logged in status is common across all the blogs, but you can use is_blog_user($blog_id) to determine whether the current logged in user is a member of that blog. … Read more

Categories multisite Tags functions, login, multisite, users

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

Redirect loop when trying to login to /wp-admin/ [duplicate]

I found a solution. In wp-config.php add: define(‘FORCE_SSL_ADMIN’, false); In my situation, I migrated to https from http, and use plugin Rename wp-login.php My wp-config.php contained the lines: define(‘WP_SITEURL’,’https://example.com’); define(‘WP_HOME’,’https://example.com’); Without the line define(‘FORCE_SSL_ADMIN’, false);, a redirect loop occurs.

Categories loop Tags login, loop
Older posts
Newer posts
← Previous Page1 … Page160 Page161 Page162 … 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