The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join

Functions

Automatically Add rel=”noopener noreferrer” to External Links

This snippet automatically adds rel=”noopener noreferrer” to external links in post content that open in a new tab (target=”_blank”). It improves security by preventing the linked page from accessing your website through the window.opener object. Steps Open your active theme’s functions.php file or a custom functionality plugin. Add the code below. Save the file. External […]


Disable Image Compression for Full-Quality Uploads

By default, WordPress compresses JPEG images during upload to reduce file size. This snippet disables that compression by setting the image quality to 100%, preserving maximum image quality for photographers, designers, and portfolio websites. Steps Open your active theme’s functions.php file or a custom functionality plugin. Add the code below. Save the file. Upload a […]


Add a Custom Message Before the Checkout Form in WooCommerce

Steps Open functions.php. Add the code below. Save the file. Done — a custom notice will be displayed at the top of the WooCommerce checkout page. Notes Works only on the WooCommerce checkout page. Supports HTML for styling and links. Can be added to your theme’s functions.php file or a custom plugin.


Disable Attachment Pages and Redirect to the Media File

Description WordPress creates a separate attachment page for every uploaded media file. These pages often provide little value and can lead to thin content. This snippet redirects visitors from attachment pages directly to the original media file. Steps Open your active theme’s functions.php file or a custom functionality plugin. Add the code below. Save the […]


File Upload with Image Preview

Create a file upload input that displays a preview of the selected image before upload. Usage Ideal for: User profile images Product image uploads Featured image previews


Automatically Apply a Coupon Code in WooCommerce

Steps Open functions.php. Add the code below. Save the file. Done — the specified coupon code will be automatically applied when a customer visits the cart or checkout page. Notes Replace WELCOME10 with your actual coupon code. The coupon must already exist in WooCommerce. Works on both Cart and Checkout pages. Can be added to […]



Disable WooCommerce Product Reviews

Steps Open functions.php. Add the code below. Save the file. Done — product reviews and ratings will be disabled across your WooCommerce store.


Hide WooCommerce Product SKU on Product Pages

Steps Open functions.php. Add the code below. Save the file. Done — the product SKU will no longer be displayed on single product pages. Notes Hides SKUs across WooCommerce product pages. Does not remove the SKU from the admin area.



Proudly supported by