WordPress.org

Ready to get started?Download WordPress

Forums

Page Links To
[resolved] no open in new windows (11 posts)

  1. nusquama
    Member
    Posted 1 year ago #

    hi,

    i use Ajax Content Navigator : http://demo.themefluent.com/?acn

    when i click on the post, it don't open on new window... ? problem with ajax ?

    http://wordpress.org/extend/plugins/page-links-to/

  2. cielosky
    Member
    Posted 1 year ago #

    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.

  3. nusquama
    Member
    Posted 1 year ago #

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

  4. Antonio Carlos Feu
    Member
    Posted 1 year ago #

    Please, I need some help.

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

  5. Jayesh Patel
    Member
    Posted 1 year ago #

    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 :)

  6. Jayesh Patel
    Member
    Posted 1 year ago #

    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 :)

  7. Funkan
    Member
    Posted 1 year ago #

    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?

  8. Jayesh Patel
    Member
    Posted 1 year ago #

    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 :)

  9. Funkan
    Member
    Posted 1 year ago #

    Thank you, but where do I put it?

  10. Jayesh Patel
    Member
    Posted 1 year ago #

    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 :)

  11. Mark Jaquith
    WordPress Lead Dev
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.