Redirect Users on Their First Login
Sends each user to a welcome or onboarding page the first time they log in, and to the usual place after that.
Snippet Library
3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.
Sends each user to a welcome or onboarding page the first time they log in, and to the usual place after that.
Sends visitors who open wp-login.php?action=register to your own registration page.
Sends users to your homepage after they log out instead of showing the "You are now logged out" login screen.
Sends logged-out visitors who open /wp-admin/ to the homepage instead of the login page, so bots probing wp-admin do not learn where to log in.
Refuses login form submissions that are not sent from a page on your own site, which stops many brute-force bots that post straight to wp-login.php.
Refuses login attempts for usernames bots love to try, such as "admin", "administrator" or "root", before WordPress even checks a password.
Shortens browser tab titles in the admin and on the login page by dropping the trailing "— WordPress".
Once a day, removes expired login sessions that WordPress keeps in user meta until the user logs in again, which on membership sites and shops adds up to a lot of dead data.
Strips the author and commenter usernames WordPress adds to body and comment classes, closing a quiet way to discover login names.
Sends visitors who are not logged in to the login screen when they open the pages you list, and brings them back to the page after they log in.
Sends visitors who are not logged in from the shop, product, cart and checkout pages to the My Account login form, for wholesale and members-only stores.
Makes the whole front end private: visitors who are not logged in are sent to the login page and returned to the page they asked for afterwards.
After logging in on the My Account page, customers go back to the page they were browsing, such as a product or the cart, instead of the account dashboard.
After logging in, visitors land back on the page they came from instead of the dashboard, which suits membership and community sites.
Sends nosniff, a strict referrer policy, a restrictive permissions policy and a cross-origin opener policy on dashboard and login pages, which front-end header snippets do not cover.
Takes customers to the shop page after they log in or register through WooCommerce, instead of the My Account dashboard.
Chooses where people land after logging in based on their role, for example editors to the posts list, customers to their account and subscribers to a members page.
When someone who is already logged in opens wp-login.php, they go straight to the dashboard (or the homepage for subscribers) instead of seeing the form again.
Sets GA4 user properties for whether the visitor is logged in and their role (for example customer or subscriber), so you can compare members and guests in reports.
Users who cannot edit posts (subscribers, customers) land on the homepage after logging in instead of their admin profile. Staff still go to the dashboard.
When someone logs in on a site where they are not a member, sends them to the dashboard of their primary site instead of an error page.
When a logged-out visitor opens a private post or page, they are sent to the login screen and back again, instead of seeing a "not found" error.
Makes administrator logins expire sooner than everyone else's, limiting the damage of a forgotten logged-in browser.
Lets you hide individual menu items from guests, members or certain roles by giving them a CSS class such as wpide-logged-in, wpide-logged-out or wpide-role-editor.