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!
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
Member
Posted 1 year ago #
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
Member
Posted 1 year ago #
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.
cotton.rohrscheib@pleth.com
Member
Posted 10 months ago #
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.
cotton.rohrscheib@pleth.com
Member
Posted 10 months ago #
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.
jBuzz
Member
Posted 10 months ago #
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.
cotton.rohrscheib@pleth.com
Member
Posted 8 months ago #
morcom
Member
Posted 5 months ago #
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?
milprod
Member
Posted 3 months ago #
@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'
Josefus Flavius
Member
Posted 3 months ago #
Thanks, Milprod - works perfectly!
I've been looking, and looking, and looking for a solution...
VERY much appreciated!
JF
milprod
Member
Posted 3 months ago #
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 !