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 […]
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 […]
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.
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 […]
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
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 […]
Steps Open functions.php. Add the code below. Save the file. Done — the Additional Information tab will be removed from all WooCommerce product pages.
Steps Open functions.php. Add the code below. Save the file. Done — product reviews and ratings will be disabled across your WooCommerce store.
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.
Steps Done — a custom message will appear below the Add to Cart button.