Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a plugin that makes external links open in new window, BUT only on the pages or domains or links I specify?

share|improve this question
1  
what's the point? if you want target="_blank" on specific links why not just add it manually? – One Trick Pony Jun 27 '11 at 4:49
13 % accept rate Please(!) go and start accepting answers for your Qs! – kaiser Jun 27 '11 at 10:03
1  
yes dreamgrowers,if you got answer means just accept the answer and earn 2 points....:) – Ramkumar Jun 27 '11 at 11:20
I have hundreds of outbound links which I would like to open in a new tab, but have exceptions be possible. I've seen plugins to make external links open in a new tab, but it's an all or nothing thing... – dreamgrowers Jun 28 '11 at 6:40

2 Answers

up vote 1 down vote accepted

Simple Popup Plugin . this plugin helps to made external links open..WordPress Popup Scheduler

share|improve this answer
I have hundreds of outbound links which I would like to open in a new tab, but have exceptions be possible. I've seen plugins to make external links open in a new tab, but it's an all or nothing thing... – dreamgrowers Jun 28 '11 at 6:40

It's not that hard - depending where you want it:

<?php
/* Plugin Name: (#21153) Open links in new window/tab */

function wpse21153_open_new_window( $content )
{
    // Add all your statements, when a link has to open in a new tab, here.
    if ( is_page() )
        return link_add_target( $content );

    return $content;
}
foreach( array( 'content', 'excerpt' ) as $location )
    add_action( "the_{$location}", 'wpse21153_open_new_window' );
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.