Remove Archive Title Prefixes (WordPress & WooCommerce)
This WordPress snippet hooks into the get_the_archive_title filter to clean up the default page titles displayed on archive pages.
This WordPress snippet hooks into the get_the_archive_title filter to clean up the default page titles displayed on archive pages.
If the “Disable Password Fields on membership registration forms” option is active in MemberPress settings (Dashboard > MemberPress > Settings > Account tab), MemberPress will trigger the default WordPress email containing a password reset link. This code snippet will prevent that email from being triggered.
Allow donors to be be added without an email address.
The code hooks into Contact Form 7 email validation and checks the submitted email against entries stored in the CFDB7 database. If the same email was already used in the specified form during the last 15 days, the form submission is blocked and an error message is displayed to the user. Key Features: • Prevents […]
Redirect users to different pages after login based on their WordPress role. This snippet sends administrators to the WordPress dashboard while redirecting all other users to a custom account page. Useful for membership sites, WooCommerce stores, client portals, and custom user experiences. Features Redirect admins to /wp-admin/ Redirect subscribers, customers, and other roles to a […]
The nonce_life filter in WordPress allows developers to modify how long nonces remain valid before expiring. In this example, the nonce expiration time is changed from the default WordPress lifetime (approximately 24 hours) to just 120 seconds (2 minutes). A nonce in WordPress is a security token used to protect actions such as: Form submissions […]
This helps to Fix missing SEO titles automatically
Shows a safe pre_get_posts pattern for modifying only the primary front-end query.
Changes the WordPress login logo link so it points to the site home URL instead of WordPress.org.
Uses the wpseo_robots filter from the Yoast SEO plugin to apply strict robots meta directives (noindex, nofollow, noarchive, nosnippet, etc.) to specific page templates such as product and category landing pages. This prevents these pages from appearing in search results or being crawled, making it ideal for handling duplicate, thin, or conversion-focused content. Runs at […]
Enter to see all results · Esc to close