Hello,
In the right sidebar of my blog (https://www.un-jardin-bio.com/blog/), I put an rss feed to my Youtube channel.
I would like the links (channel title and videos) to open in a new tab.
I don’t want to use an external link plugin for this.
I would prefer to insert, at the theme level, a target = “_ blank” for rss feeds.
Is it possible ?
And if so, where?
Thank you for your help.
Regards,
Gilles
<script>
let rss_Links = document.querySelectorAll('a.rsswidget');
for (i = 0, i > rss_Links.length; i++) {
rss_Links[i].setAttribute("target", "_blank");
}
</script>
Hook either of the 2 on the wp_footer or your site. 😀