WordPress.org

Support

Support » How-To and Troubleshooting » Help needed: How to open rss-links in new window?

Help needed: How to open rss-links in new window?

  • Hi guys!

    Have to run my installed wordpress blog in an iframe (know it´s not a good solution but the only one that works for me right now).

    Problem is that the links from the rss-widget (rss from other blogs and so on) i have in the right column opens within the iframe. Not looking good.

    I´ve tried to find the right php-code to adjust this but havent found it/got it right. So here´s my questions:
    1. Which php-page/pages for the widget do i need to adjust the code in?
    2. How do I write the code correctly?

    Thanks for any help on this!

Viewing 13 replies - 1 through 13 (of 13 total)
  • your solution is as simple as adding a _blank to the link code

    for example
    <a href="http://www.crunchyroll.com/rss/drama" target="_blank">http://www.crunchyroll.com/rss/drama</a>

    so here is a wordpress example
    <a href="<?php bloginfo('rss2_url'); ?>" target="_blank">Entries (RSS)</a>

    Thank´s Vachi. But problem is i can´t find the corresponding php-page to make this adjustment in. Would be grateful if you could help me out here!

    chocobo2k

    @chocobo2k

    Just for those who are still looking… It depends where you want to put it. you can open your theme header.php and put the link under the search field for example.

    kuri2007

    @kuri2007

    Hello,

    I think my problem is similar to the one of tobbe_l.
    I’d like the RSS feeds (from other sites) that I added in widgets appear in a new window when they are clicked.
    What is the document to edit and where do I have to put the _blank code?

    You can see the feeds on my blog (they have a big rss icon):
    When you click on them, you quit my blog to go to another one!
    http://france-japon.net/
    I want to open a new window instead.

    Thanks for your help.

    This seems to be a mystery…
    Before stumbling onto this post I also posted the same question here:
    http://wordpress.org/support/topic/229767?replies=2

    So far I haven’t gotten a response yet either.

    Does anyone know of a paid service where we might could locate an answer to this question? I am not having very much luck in getting a response on these forums. Not complaining, these things exist on a volunteer basis but would like to know of some alternatives. This is one of those rare cases where an answer to an issue is not readily available from within the community.

    Just look in one of the widget.php files and add target=’_blank’ to make new window open… look earlier in this post for a full syntax.

    Sorry cotton.rohrscheib@pleth.com I would have loved your solution to work however I’m now running WordPress 2.8. and they have changed the widget.php file.
    It’s now less that 1,300 lines and the code identified is no longer there.
    Thanks anyway

    Why is this not an option built into WordPress? I have looked for hooks into this widget to see if I can create something but can not seem to find any place to do this. Has anyone figured this out?

    @morcom
    I believe this part moved to the defaults-widgets.php in wp-includes.
    I found it in lines 728 & 837

    edit: search for: href='$link'
    and replace with: href='$link' target='_blank'

    Thanks, Milprod – works perfectly!

    I’ve been looking, and looking, and looking for a solution…

    VERY much appreciated!

    JF

    It worked for me, too, in 2.8.3 !!!
    @jf: don’t forget to save your changes separately (or write it down somewhere) because an upgrade will override the wp-includes !

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Help needed: How to open rss-links in new window?’ is closed to new replies.
Skip to toolbar