I’ve updated my Blank Target Replacement plugin by adding a feature: any links contained in posts and pages will automatically have
WordPress version 2.2 or higher â€” may work with previous versions, I hadn’t tested!
- Upload the blank-target-replace folder to WordPress plugins directory and activate on the Plugins page in WP-Admin
- Go to Blogroll > External Links
- Choose the links you want to open in a new window, or tick the top checkbox in the gray bar to check all links as external. Click the “Mark Links External” button at the very bottom of the page.
- That’s it! Links in your blog entries will automatically have rel=”external” added.
Caveats / Issues
I did this pretty much on the fly. If you have any Blogroll links that have other rel attributes assigned (i.e. me, neighbor, met, etc. – any of the options under Link Relationship/XFN), you may experience problems getting the link(s) to open in a new window. Best thing is to clear out any existing XFN attributes for each link.
Same thing goes for links in posts that use lightbox or another setting for the rel attribute. It may or may not work.
I have not found a graceful work-around for these yet.
Use at your own risk. No warranty expressed or implied is provided. There is no guarantee that this will work for your version of WordPress, I wrote this out of need for myself and am sharing in the hopes someone else finds it useful.
Copyright / Permission
This plugin is released under the Creative Commons Attribution-Noncommercial-Share Alike license. Have fun!