Send Logged-In Members From the Homepage to Their Page
Redirects logged-in users who visit the homepage to a members area, dashboard or account page, while guests still see the normal homepage.
Snippet Library
3,040 snippets written and tested by the WPIDE team.
Redirects logged-in users who visit the homepage to a members area, dashboard or account page, while guests still see the normal homepage.
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.
Sends WooCommerce low stock and out-of-stock notifications to a purchasing or inventory address instead of the store admin.
Adds an extra recipient to the "New order" email when the order contains products from a category, so suppliers or warehouse teams only get the orders they fulfil.
Adds another recipient, such as a warehouse or fulfillment partner, to the WooCommerce "New order" email.
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.
Adds a wpide_console() helper that prints any PHP variable to the browser's developer console for administrators, so you can inspect data without breaking the page layout.
When someone opens a page number that no longer exists, such as /category/news/page/40/ after you deleted posts, sends them to the real last page instead of a 404.
Wraps the plain-text emails WordPress sends (password resets, notifications, form plugins) in a simple HTML layout with your site name and clickable links.
Redirects visitors who hit a missing page in a secondary Polylang language to that language's homepage, so they are not dropped onto a 404 page.
Tells Google Analytics 4 which category, author and post type each page belongs to, so you can see which topics and writers bring the most engagement.
Takes shoppers straight to a product category page when what they search for is exactly a category name, such as "dresses" or "garden tools".
When a visitor hits a missing page in a non-default WPML language, sends them to the homepage of that language instead of a 404, keeping them in their language.
Redirects the single pages of post types that only make sense in a list, such as testimonials, FAQs or team members, to their archive or another page.
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.
Posts every WPForms submission as JSON with field labels as keys to a webhook URL, such as Zapier, Make, n8n or a CRM, without a paid add-on.
Sends WPForms notifications to the author of the post or page where the form was filled in, for agent, listing or team profile pages.
Delivers all WordPress emails through the Brevo (formerly Sendinblue) transactional email API, so mail goes out even where SMTP ports are blocked.
Delivers all WordPress emails through Mailgun's HTTP API, which avoids blocked SMTP ports and gives you Mailgun's delivery logs and tracking.
Delivers all WordPress emails through Postmark's HTTP API instead of PHP mail or SMTP, for fast, reliable delivery on hosts that block outgoing mail ports.
Delivers all WordPress emails through SendGrid's v3 Mail Send API instead of PHP mail or SMTP, for reliable delivery and SendGrid's activity feed.
Redirects Wordfence's security alert emails to a dedicated address (such as your agency's monitoring inbox) and adds a site tag to the subject, without changing the site admin email.