WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Simple RSS Feeds Widget] Having the links open in a new window

[Plugin: Simple RSS Feeds Widget] Having the links open in a new window

Viewing 7 replies - 1 through 7 (of 7 total)
  • PLEASE CAN YOU LET ME KNOW HOW I CAN OPEN LINKS IN A NEW WINDOW E.G

    WHERE SHOULD I PUT THE CODE AND WHAT CODE IS IT

    TARGET=”BLANK”

    I NEED TO KNOW WHERE TO INSERT IT IN THE SCRIPT

    Hello,

    I would also like to know the answer to this question. I run a website for a local church and I would very much like RSS article links to open in a new page. Do I need to edit the PHP file? If so, where do I change it, and what code should I use? I am not familiar with PHP

    This looks very promising.

    Like the folks above, I reckon ‘open in new window’ is pretty essential and would round the plugin off nicely.

    Somehow, remembering to ‘right-click and open in new tab’ just isn’t intuitive.

    Here’s hoping for a wee tweak from the developer!

    Cheers

    Go to Plugins –> Editor and select “Simple RSS Feeds Widget”.
    Edit the file “simple-rss-feeds-widget/simplerssfeedswidget.php”.

    Go to line 317 and insert ‘target=_blank’ so that the line looks like this:

    echo( '<li><a title="'.date_i18n( get_option( 'date_format' ), $item->get_date( 'U' ) ).'" target=_blank href="'.$item->get_permalink().'">'.$item->get_title().'</a>' );

    You have to be careful when updating this plugin next time since your “hack” will be overwritten by the update.

    Happy RSS’ing!

    Hi Mr. Swede,

    I tried your suggestion, and I keep getting error messages from WordPress saying the plugin was deactivated because of a fatal error:

    Parse error: syntax error, unexpected ‘.’ in /hsphere/local/home/*username*/*domain*/wordpress/wp-content/plugins/simple-rss-feeds-widget/simplerssfeedswidget.php on line 366

    sometimes it gives me an error on line 317, sometimes 365.

    Any idea why this might be happening?

    Thanks!

    I suggest you reinstall the plugin and try again. It looks as if you unintentionally made other changes to the php file.

    I downloaded the plugin with an FTP client and used a text editor to perform the changes locally before uploading it to my site.

    @mr_swede,

    Thanks for the mod – it now works a treat.

    Nice work.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Simple RSS Feeds Widget] Having the links open in a new window’ is closed to new replies.