Support » Plugin: Page Links To » [Plugin: Page Links To] "Open this link in a new window" doesn't seem to be working

Viewing 15 replies - 1 through 15 (of 15 total)
  • 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!

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

    (and it’s line 265 in mine)


    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.

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

    @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.

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

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

    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?

    Plugin Author Mark Jaquith


    WordPress Lead Dev

    Try version 2.6!


    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


    Adding this plugin should do the trick…




    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.



    Thanks 3×7 – adding that other plugin ‘open external links in a new window’ made it work for me.


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

    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?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: Page Links To] "Open this link in a new window" doesn't seem to be working’ is closed to new replies.