There are three possible scenarios where this plugin does something:
A) A visitor lands on an attachment page and the parent post is available (not in trash or deleted). A 301 redirect will be issued to redirect the visitor to the parent post.
B) A visitor lands on an attachment page and the parent post was already deleted from trash. A 302 redirect is issued to home page (this can be changed to 301 if you want, see FAQ for more details).
C) A visitor lands on an attachment page and the parent post is in trash, therefore not available for the visitor. It returns a 404 error code to prevent endless redirection loop in old WP releases and redirecting to trashed/not available posts.
There is no options page, simply activate it and will do the job.
If you’re happy with the plugin please don’t forget to give it a good rating, it will motivate me to keep sharing and improving this plugin (and others).
wp-content/plugins/directory of your WordPress installation (or install it directly from your dashboard) and then activate the Plugin from Plugins page.
It should work with WP 3.3 or newer, but I’m not supporting versions older than the one required in this readme.
Since version 1.1 you can do this by adding constants to your wp-config.php file. The example below will switch the redirection codes used by default.
define( 'ATTACHMENT_REDIRECT_CODE', '302' ); define( 'ORPHAN_ATTACHMENT_REDIRECT_CODE', '301' );
Use this at your own risk, only if you know what you’re doing!! No support will be offered for this.
Redirect attachment pages or return a 404 error for them based on the parent post status.View Cart
This plugin inserts social share links at the top or bottom of each post.
Search & Replace data in your database with WordPress admin, replace do...
WooCommerce AJAX Product Filters - Advanced product filtering ability for y...
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel g...