WordPress.org

Ready to get started?Download WordPress

Forums

Page Links To
Open in New Window (23 posts)

  1. KustomByKris
    Member
    Posted 3 years ago #

    I was wondering if a fix for the problem with the link not opening in a new window has been found. This is one of the favorite plugins on my multisite and members would love to see it working properly.

    http://kbkconnect.com

    Thank you!

    Kris

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

  2. petarc
    Member
    Posted 3 years ago #

    bump..

    I'm using the latest WP install..

  3. jeromerobins
    Member
    Posted 3 years ago #

    i need to know this too...PLEASE HELP :(

  4. wibaux27
    Member
    Posted 3 years ago #

    Same problem, VERY frustrating. Any help much appreciated.

  5. yomigirl
    Member
    Posted 3 years ago #

    Had the same problem, after racking my brain for hours, i figured out why I was getting an error. For some reason, with the new WP install, the link path changed. Mine changed from:
    http://xxxxx.com/archives/category/photography to
    http://xxxxx.com/category/photography

    Hope it helps.

  6. chardant
    Member
    Posted 3 years ago #

    Also have the same problem, that is despite checking the box that says "Open this link in a new window", the resulting link opens in the same window, not a new one. That's confirmed by looking at the HTML, which should have a target="_blank" as part of the link, but does not.

    Anyone know how to tweak the code to make this happen?

    thanks

  7. numaga
    Member
    Posted 3 years ago #

    I've been trying to do this as well. No success, no support no nothing. This plugin should be removed from wordpress.org.

  8. chardant
    Member
    Posted 3 years ago #

    ok, I'm a lightweight in the PHP realm, but I did look the code over a few times and decided to try something in the HTML portion that seems to have worked... I noticed that the <input> tags for the 2 checkbox options were inside the <label> tags, which didn't seem right... so I moved the <input> tags outside and tried it and it's functioning fine for me, that is I get a redirect in a blank window.

    Look for lines 159 & 160 (for me anyways) in the page-links-to.php file and rework them to be as follows:
    - - - - - - - - - - - -
    <p><input type="checkbox" name="txfx_links_to_new_window" id="txfx_links_to_new_window" value="_blank" <?php checked( '_blank', get_post_meta( $post->ID, '_links_to_target', true ) ); ?>> <label for="txfx_links_to_new_window">Open this link in a new window</label></p>
    <p><input type="checkbox" name="txfx_links_to_302" id="txfx_links_to_302" value="302" <?php checked( '302', get_post_meta( $post->ID, '_links_to_type', true ) ); ?>> <label for="txfx_links_to_302">Use a temporary 302 redirect (default is a permanent 301 redirect)</label></p>
    - - - - - - - - - - - - -

    Hopefully it works for you also.

  9. KustomByKris
    Member
    Posted 3 years ago #

    It works in the sense that the link opens in a new window, but now the links open in a new window even if the box is not checked.

  10. KustomByKris
    Member
    Posted 3 years ago #

    I think I may have found the fix! I made the change that chardant suggested above along with the following...

    Line 179 reads:
    delete_post_meta( $post_ID, '_links_to_target' );

    Change it to this:
    update_post_meta( $post_ID, '_links_to_target', '' );

  11. numaga
    Member
    Posted 3 years ago #

    guys, i'm going to try this and if it works I be your Nr.1 fan forever!

    I really REALLY need this thing to work. Fingers crossed, will post results soon.

  12. numaga
    Member
    Posted 3 years ago #

    :( Can't get it to work guys. I replace the two lines suggested by chardant, and the suggestion by kustombykris but I can't get it to work...

    Would you guys be so kind and upload your edited version of the plugin somewhere so I can download and try it?

    I really really need this thing to work.

    Thanks

  13. KustomByKris
    Member
    Posted 3 years ago #

  14. wibaux27
    Member
    Posted 3 years ago #

    I don't understand, this is still not working for me. I've plugged in the new php file and everything. Is there something that could be missing?

    Anyone else having any problems?

    Any further help would be very appreciated thanks so much!

  15. erbrown777
    Member
    Posted 3 years ago #

    None of the above is working for me too.

    I notice that the download link points to version 2.4, but the changelog shows a "previous version" 2.4.1. I tried version 2.4.1 but that version does not work either.

  16. erbrown777
    Member
    Posted 3 years ago #

    I tried rolling back to (as far back as) version 2.2 to see if that works and it does not.

    I reinstalled version 2.4.1 and created a separate menu. On this menu the page opens in a new tab but not on the standard menu in the theme.

  17. wibaux27
    Member
    Posted 3 years ago #

    I'm confused. You had to create a whole new menu for it to work??

  18. erbrown777
    Member
    Posted 3 years ago #

    @wibaux27 Nope. It still does not work from the main menu (the links still do not open in a new page). They do, however, open in a new page in a widget menu.

  19. chardant
    Member
    Posted 3 years ago #

    After trying unsuccessfully to get this plugin to work correctly in the majority of settings I decided to look for a different solution.

    I tried out a different plugin for this, Quick Page/Post Redirect, and it is working well, even in those settings where Page Links To does not. Try it out and see if it does the trick for you.

    I noticed in the FAQ for the Quick Page/Post Redirect plugin that the developer also has gotten some user saying that it doesn't open links in a new window; he responded, explaining "Generally, the issue is the way the theme is creating the menu" (see his full Nov 8, 2010 comment response).

    Hope this helps.

  20. wibaux27
    Member
    Posted 3 years ago #

    Thanks for posting that Chardant. Quick Page/Post Redirect worked for me also, I would recommend it.

  21. asiaexpat
    Member
    Posted 3 years ago #

    i have searched for Quick Page/Post Redirect plugin but cant find it--can someone post the link

    thanks

  22. chardant
    Member
    Posted 3 years ago #

    link for Quick Page/Post Redirect plugin is http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/

  23. asiaexpat
    Member
    Posted 3 years ago #

    i used Category Redirect to Post or Page plugin

    works perfectly

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic