Send Secondary-Language 404s to That Language's Homepage
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.
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.
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.
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.
Creates short links such as /go/amazon/ that redirect to long affiliate or partner URLs, so links in posts stay tidy and you can update a destination in one place.
Stops WooCommerce from jumping straight to a product when a search has only one match, so shoppers always see the search results page.
Redirects old URLs to new ones with a 301 status from a list you maintain in the snippet. Good for a handful of moved pages.
Sends visitors straight to the post when a category or tag archive contains just one post, saving them a pointless extra click.
Sends shoppers who open the cart page straight to checkout when their cart has items, for a shorter path to purchase.
Sends users with certain roles straight to a more useful screen, like the Posts list, whenever they open the dashboard.
Turns an address such as /app/ into one link for posters and QR codes: iPhone visitors go to the App Store, Android visitors to Google Play and everyone else to a page you choose.
Keeps visitors on the homepage they asked for instead of Polylang redirecting them to another language based on their browser, which also avoids caching and SEO surprises.
Stops WordPress from redirecting a post's previous URLs after its slug changes, for when you want an old address to be free or truly gone.
Turns off the automatic redirect WordPress makes when a URL does not exist but looks similar to a post slug, so wrong URLs show a real 404.
Sends homepage visitors to a promotion or event page during a date range you set, such as a Black Friday sale, then switches back automatically.
Sends visitors who hit a missing page to a site search for the words in the broken address, so they land on likely matches instead of a dead end.
Sends students who log in through wp-login.php to the Tutor LMS dashboard instead of the WordPress admin profile.
Sends students to a page you choose, such as a review request or next course, right after they click "Complete Course" in Tutor LMS.
Sends visitors who open wp-login.php to your own login page (for example one with the login form shortcode), and back there when a login fails.
Redirects whole groups of old URLs with simple * patterns, for example everything under /old-blog/ to the same address under /blog/, without a redirect plugin.