Forums

[resolved] RSS Widget link (9 posts)

  1. superwad
    Member
    Posted 3 years ago #

    Is there a way to remove the link, or preferably change the link, in the RSS widget for the sidebar? I've seen a couple posts, but none posted a resolution.

    Thanks!

  2. superwad
    Member
    Posted 3 years ago #

    Any ideas?

  3. alanft
    Member
    Posted 3 years ago #

    you could use CSS to change it do display:none

  4. superwad
    Member
    Posted 3 years ago #

    That would properly hide the title. While I will do that if it comes down to it, I'd ideally like to be able to change the link to a link of my choosing. Is there a patch, or a new version, or a way to manually hack in the URL I want?

    Thank you for your comment.

  5. alanft
    Member
    Posted 3 years ago #

    you can use CSS to just hide the link but keep the title (just add an 'A' selector on the end)

    you can edit the widget code, or if you are up to the PHP-ness of writing WP filters, you can use a plugin of mine (widget logic) that provides a 'widget_content' filter. it's how i prefer to tinker with widget presentation, but it does mean writing PHP in your theme's functions.php

  6. superwad
    Member
    Posted 3 years ago #

    Alright, thanks. I'll give this a shot and let you know how it turns out :)

  7. superwad
    Member
    Posted 3 years ago #

    I got it resolved.

    wp-includes/widgets.php Line 1084 (in the function wp_widget_rss)

    Replace
    $title = "<a class='rsswidget' href='$url' title='" . attribute_escape(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>";
    with
    $title = "<a class='rsswidget' href='$url' title='" . attribute_escape(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' />&nbsp;$title</a>";

    Works just fine now :)

    Thanks for the help.

  8. admin95
    Member
    Posted 3 years ago #

    Superwad- I appreciate you coming back to post your solution, I think most don't. You just saved me several hours of headache hunting down which template to alter for my RSS title. Again, thank you.

  9. garryconn
    Member
    Posted 2 years ago #

    There was a page I found a few months ago that showed exactly how to style this with CSS. If you use the above widgets.php fix, it'll erase next time you update WordPress with the current version. You'd have to remember to patch that file each time. There proper way would be to use CSS and put in your active theme style.php file. I'll try to find the page and update the thread if I find it.

Topic Closed

This topic has been closed to new replies.

About this Topic