WordPress.org

Ready to get started?Download WordPress

Forums

Rss Widget Open in New Window (target="_blank") ?? (6 posts)

  1. deek
    Member
    Posted 7 years ago #

    Hello Guys, I am new to WordPress and I am very excited about using it!

    I start a site and added the rss widgets to my sidebar.
    The rss feeds work perfectly.

    However, by default, the links do not open in a new window or some might know it as target="_blank". How do I get the links to open up in a new window/target ?

  2. deek
    Member
    Posted 7 years ago #

    Anyone please :( ?

  3. deek
    Member
    Posted 7 years ago #

    ?????????????

  4. prokihun
    Member
    Posted 7 years ago #

    You must edit the widget.php file in the wp-includes folder. Do use only an utf-8 editor like SuperEdi. In the "function wp_widget_rss" section find part of the code and insert target='\"_blank\"' just like inserting in html anchor tag. There are 3 of them. It's only php syntax, that's all.

  5. prokihun
    Member
    Posted 7 years ago #

    o.k., it turned out to be chaotic. next try:

    You must edit the widget.php file in the wp-includes folder. Do use only an utf-8 editor like SuperEdi. In the "function wp_widget_rss" section find the a class='rsswidget' href=... parts of the code and insert target='\"_blank\"' just like inserting in html anchor tag. There are 3 of them. It's only php syntax, that's all.

  6. pizdin_dim
    Member
    Posted 7 years ago #

    "However, by default, the links do not open in a new window"

    That's because in XHTML "strict" mode, that's illegal and in XHTML "transitional" it's depreciated at best. See this for an alternate JS solution.

Topic Closed

This topic has been closed to new replies.

About this Topic