How to open a rss feed in a new tab?

Posted in: Newsmag
Post count: 9

Hi,
In my web site there are rss feeds. When click a feed it opens directly feed page and leaves my site. How can I do it to be opened in a new tab without leaving my website?

  • This topic was modified 5 years by AllTurk.
Post count: 35449

Hi,
For this you’ll need to set your rss feeds inside of some html tags with the blank parameter as in this example https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_link_target
Hope this will help you!

Post count: 9

Hi Calin,
Ok I understood it ,
but I dont know which file to write it.
I have screenshot where and How did I add rss feed.
https://www.asuswebstorage.com/navigate/a/#/s/5B42633A6F6F49EB952026BA9E7396D24
thanks

Post count: 35449

Hi,
I just made some tests and to can set the rss to open in a new tab, you need to made some change’s in theme files (something similar with this https://www.warrenchandler.com/2013/06/04/wordpress-open-rss-widget-links-new-window/).
Unfortunately those changes need to be made after each theme update.
Thank you!

Post count: 9

Hi,
In this link https://www.warrenchandler.com/2013/06/04/wordpress-open-rss-widget-links-new-window/), he says you need to change defaults-widgets.php in your wp-includes folder.
But In my defaults-widgets.php there are no codes like his file.
Which theme file did you make change’s similar to it?
Regards!

Post count: 35449

Hi AllTurk,
The file that need to be edited is wp-includes/widgets.php on line 1580 and 1582 https://i.imgur.com/Ozgvo2p.png you need to add target=’_blank’ like this -> https://i.imgur.com/EgunKDP.png then the results will be -> https://i.imgur.com/vksebaD.png
Hope this will help you!
Let me know the results!

Post count: 9

Hi Calin,
Thank you very much.
It is working.

Regards…

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newsmag’ is closed to new topics and replies.