• I know this has been mentioned a number of times, but I’ll bring it up again since those posts are closed to further discussion.

    Even though the “open in new window” box is checked, it’s not doing so.

    If there is no support for this plugin anymore, and no fix for this problem, can anyone recommend a different plugin that does basically the same thing as this one is supposed to do? I have a few WP sites that need external link menu items (which open in a new window), and I haven’t been able to track down anything else.

    https://www.ads-software.com/extend/plugins/page-links-to/

Viewing 8 replies - 16 through 23 (of 23 total)
  • Amy Elizabeth

    (@amyejones2gmailcom)

    I read these comments and I STILL cannot get it to work. I added the open external link in new window plugin and still no luck. Any more suggestions???

    I have left this plugin for a couple of years because it was not useful since the OPEN LINK IN A NEW TAB was not working.

    I have just installed it again and I hoped to find this bug fixed but it’s still not working.

    Mark Jaquith, do you have any idea when you will fix this main feature of your plugin?

    If it’s going to be a late fix in the years, folk do you suggest any other plugin that does similar things?

    Thanks

    Thanks MissDeja! The “Open external links in a new window” plugin worked like a charm>

    Fixed this issue

    page-links-to.php (line no 212)

    function template_redirect() {
    if ( !is_single() && !is_page() )
    return;
    global $wp_query;
    $link = get_post_meta( $wp_query->post->ID, ‘_links_to’, true );
    if ( !$link )
    return;
    wp_redirect( $link, 301 );
    exit;
    }

    Replace with below code

    function template_redirect() {
    //if ( !is_single() && !is_page() )
    // return;
    global $wp_query;
    $link = get_post_meta( $wp_query->post->ID, ‘_links_to’, true );
    if ( !$link )
    return;
    wp_redirect( $link, 301 );
    exit;
    }

    It is working fine ??

    ANother Hoorah! for MissDeja’s contribution. This has been the only way I’ve been able to get it to work as well. Crazy that it was this much effort to get something to do what you’d think it should do already!

    @jayesh Patel

    I tried your solution and it resulted in the entire website automatically redirecting to the external link onLoad.

    @ratputin

    Please use below code

    <?php
    $newtarget = get_post_meta( $post->ID, ‘_links_to’, true);
    if ($newtarget){$target_link = ‘target=”_blank”‘;} else {$target_link = ”;}
    ?>

    < a href=” #link-here ” > ><?php the_title();?>< / a >

    It is working fine ??

    @jayesh Patel

    Sorry, but I do not understand the implementation. Should I replace the code starting at line 212 in page-links-to.php with:

    <?php
    $newtarget = get_post_meta( $post->ID, '_links_to', true);
    if ($newtarget){$target_link = 'target="_blank"';} else {$target_link = '';}
    ?>
    
    < a href=" #link-here " > ><?php the_title();?>< / a >
Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘[Plugin: Page Links To] Link STILL doesn't open in new window’ is closed to new replies.