• There are a handful of widgets that come with a standard WordPress installation, such as the RSS widget that displays data from any RSS feed in your sidebar (Design > Widgets > RSS).

    I like to modify the RSS widget code to remove the RSS icon and remove the hyperlink from the title of the feed/widget. I do this by editing ‘wp-includes/widgets.php’.

    The problem is that every time I take a WordPress upgrade I have to go re-modify the widgets.php file.

    Is there a way to prevent having to re-apply my changes to the RSS Widget in widgets.php every time I take an upgrade?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Why not just keep a backup copy of the modified file and reinstall it when you upgrade?

    Thread Starter samlesher

    (@samlesher)

    That’s what I do, sort of. Since widgets.php is part of the main release, I am hesitant to just overwrite the new file with my old modified file because it is possible that the file has been modified in the new release. Instead I reapply all my fixes manually to the new file. Its not a ton of work, but it is extra work.

    Ideally I’d like to have the RSS Widget set up like any other plugin, so that I can modify the plugin code like I do other plugins, via the admin interface. Then if a new version of the RSS Widget is released I can choose to upgrade it on my own schedule, as I do any other plugin.

    You can probably setup a PHP include/require statement to just include a custom widgets file in your theme folder. Give that logic a try, and see how far you can get with it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Make it easier to edit the widgets that come with WordPress’ is closed to new replies.