Disable Media Pages
Completely disable “attachment” pages created by WordPress. By default, WordPress creates a page for each of your attachments. This is can be undesirable because of two reasons: Search engine optimization Attachment pages don’t have any content, except an image, so they provide little value and can negatively affect your SEO because they are so-called thin content. Even worse, attachment pages may in some cases rank higher than your actual content pages which leads to a poor user experience. Reserved slugs Attachment pages can accidentally reserve slugs on your site. Let’s say you upload an image named contact.jpeg, an attachment page https://example.com/contact is automatically created. If you then try to create a page named Contact, the URL for that page will be https://example.com/contact-2 which isn’t that great. How it works This plugin works by automatically setting all attachment slugs to an unique id, so they won’t conflict with your pages. If an attachment page is accessed, the plugin will set a 404 status code and display the “page not found” template. You can also mangle any existing attachment slugs so they won’t cause any issues in the future. WP CLI support The plugin supports WP CLI. Mangle existing attachment slugs wp disable-media-pages mangle Restore attachment slugs wp disable-media-pages restore Note for WordPress 6.4 WordPress 6.4 includes a new feature that allows you to disable attachment pages. However, this feature redirects attachment pages to the file URL instead of returning a 404 error. To completely disable attachment pages, you should use this plugin instead. The WP 6.4 feature also does not fix the issue where attachment pages reserve slugs for pages. Also, there is not user interface to enable or disable media pages, they are automatically disabled for new sites but remain enabled for existing sites. Because of these issues, I recommend you to use this plugin instead of the built-in feature. The plugin will be updated in the foreseeable future, at least until attachment pages are completely removed from WordPress core and older WordPress versions are no longer in use. Thanks Special thanks to Greg Schoppe for his research and inspiration that helped a lot with developing this plugin. Support the plugin Maintaining a WordPress plugin is a lot of work. If you like the plugin, please consider rating it on WordPress.org. You can also support me on GitHub sponsors. Thank you! If you are interested, you can also check out my other WordPress plugins: Disable Customizer Disable Drop Cap ACF Image Aspect Ratio Crop
Product Attachment for WooCommerce
Product Attachment for WooCommerce Plugin will help you to attach/ upload any kind of files for a customer orders. You can attach any type of file like Images, documents, videos and many more. Create a Product Attachment for WooCommerce Plugin let admin user add attachments to products and offer them when customer purchases the product. Attachment download link can be set to auto-expire after a set period of time. Attachments can also be shown on product details page. Pro Plugin Demo: View Demo HOW IT WORKS? Store Owner will be able to attach single or multiple files directly from the “product Edit Page”?. Attachments can be downloadable/viewable on the Order details and/or Product pages. In the case of visibility on order details page, every file can be visible for different order statuses. Note: Some type document WordPress does not allow to upload for security reasons so you can add below code in wp-config.php file for allowing all type upload in Attachment. define('ALLOW_UNFILTERED_UPLOADS', true); Key Features Multiple attachments can be added Attachments can be downloadable in the Order details OR Product Detail pages. This Attachment is set status(Pending payment, Processing, On hold, Completed, Cancelled, Refunded, Failed) after that match this status then auto enable on each order download available. Set auto expiry date for order attachment ( Download link Expire) Enable attachment on Product page. Any type attachments you can attach with order Add Attachment in all products. Each Attachment have own settings (Name, Description, Uploads file, select Order status, Set expiry Date and more) Product Attachment for WooCommerce Pro version: Need even more? upgrade to Product Attachment for WooCommerce Pro version and get access to all extra features available in Product Attachment for WooCommerce Pro. Add attachment with below key features Enable attachment on Product page Add Attachment in all products/variable Products Bulk products attachments assign directly to multiple products Bulk products attachments assign directly to categories Include/Exclude selected Products and Categories Select Attachment Type with File Upload or External URL Any type of attachments can attach with the order. Includes: File type – Doc, JPG, Videos, PDF and more. Each Attachment have its own settings (Name, Description, Uploads file, select Order status, Set expiry Date and more) [New]Enable or disable attachment on email or not Explore our other plugins and theme to supercharge your WordPress website: Advance Flat Rate Shipping Method For WooCommerce Blocker – Prevent Fake Orders And Blacklist Fraud Customers for WooCommerce Enhanced Ecommerce Google Analytics for WooCommerce Category Banner Management for Woocommerce Conditional Product Fees For WooCommerce Checkout Advanced Product Size Charts for WooCommerce Advance Menu Manager for WordPress