WordPress.org

Ready to get started?Download WordPress

Forums

Page Links To
[resolved] "Open this link in a new window" doesn't seem to be working (16 posts)

  1. callumw
    Member
    Posted 2 years ago #

    Hi
    I'm using this plugin to push a site visitor to an alternate website through a menu item/page.

    I have the "Open this link in a new window" option ticked, but it opens up the link in the same window.

    Anyone else reported this?

    site: http://FlourishWell.co.uk
    Link: RelaxArt

    Ta
    CallumW

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

  2. benjamin_r
    Member
    Posted 2 years ago #

    My developer found the problem. Line 267 has an extra space in the first a href.

    `$pages = str_replace( '<a href=" ' . $p . '"', '<a href="' . $p . '" target="' . $t . '" ', $pages );

    should be:

    $pages = str_replace( '<a href="' . $p . '"', '<a href="' . $p . '" target="' . $t . '" ', $pages );

    Hope that helps!

  3. callumw
    Member
    Posted 2 years ago #

    I don't have the space in my version of the plugin....

    (and it's line 265 in mine)

    CW

  4. wintercarnival
    Member
    Posted 2 years ago #

    This worked perfect for me on wordpress pages. They were opening in new windows without problem. It stopped working all of a sudden when I upgraded wordpress to the newest version the other day.

  5. Jorup16
    Member
    Posted 2 years ago #

    @benjamin_r That works for me, thank you very much.

  6. wintercarnival
    Member
    Posted 2 years ago #

    @benjamin_r that worked for me too! thank you. it is weird though. mine worked no problem for months. all linked to pages were opening up in new windows. then one day it just stopped. i fealt like it had something to do with wordpress upgrade. i copy and pasted the above code and now it works again.
    thanks!!

  7. che-mat
    Member
    Posted 2 years ago #

    Wow.. that fix blew my mind. Thanks, @benjamin_r!

  8. jenericjarvis
    Member
    Posted 2 years ago #

    That worked. Opening in a new window had always worked prior to upgrading to 3.3. It now works on 3.3 too. THANKS!!!!

  9. pensaro1
    Member
    Posted 2 years ago #

    Hi. I have been having the same problem as described above but I can't seem to get rid of that space in the 1st a href. I have tried manual editing within WordPress and copying and pasting. I have also tried the same thing via my host cpanel but i still have that space and the link is still opening in the same window. Any suggestions?

  10. Mark Jaquith
    WordPress Lead Dev
    Plugin Author

    Posted 2 years ago #

    Try version 2.6!

  11. 3x7
    Member
    Posted 2 years ago #

    Hi,

    The fix didn't work for me... there was a litle difference in the line, but no luck...

    Any new suggestion?
    Wp 3.3.1 + latest plugin

    Thanks

  12. 3x7
    Member
    Posted 2 years ago #

    Adding this plugin should do the trick...
    http://wordpress.org/extend/plugins/open-external-links-in-a-new-window/

    Cheers

  13. MtGamberWesbiteDesign
    Member
    Posted 2 years ago #

    This doesn't work for me anymore and there wasn't a missing blank space either (although I did try that code just in case).

    It doesn't open in a new window and 3.3.1 too with the latest plugin.

  14. MtGamberWesbiteDesign
    Member
    Posted 2 years ago #

    Thanks 3x7 - adding that other plugin 'open external links in a new window' made it work for me.

    Cheers,
    Karen

  15. 3x7
    Member
    Posted 2 years ago #

    nice..-
    I just found another one, maybe even better with more options like adding icons to external links, choosing how they open etc:

    http://www.freelancephp.net/wp-external-links-plugin/

  16. lRlevolution
    Member
    Posted 1 year ago #

    Mine seems the work, only oddly. It manages to open the link in a new window, but also in the current window. any ideas why?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic