Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m having this same problem on multiple sites with different themes (Page Links To won’t open links in a new browser window when clicking the checkbox). I even experience the problem when I activate the default 2012 theme. I hope this is fixed soon.

    Thread Starter nusquama

    (@nusquama)

    i use with page links to : WP External Links and i choice use javascript to open link, and it’s workink !

    Please, I need some help.

    When clicking the checkbox the link don’t open in a new window, it’s open the same window.

    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 ??

    Fixed this issue

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

    It is working fine ??

    I’ve got the same problem.

    Jayesh Patel, the code in your last post, where do I put it? Your first solution didn’t help me, do I need the code in both of your posts?

    Funkan, Please use below code

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

    <?php echo $tarket_link; ?>><?php the_title();?>

    It is working fine ??

    Thank you, but where do I put it?

    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 ??

    Plugin Author Mark Jaquith

    (@markjaquith)

    Try the latest version of the plugin, 1.9.2, which has better support for opening links in a new tab.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘no open in new windows’ is closed to new replies.