WordPress.org

Ready to get started?Download WordPress

Forums

Make it easier to edit the widgets that come with WordPress (4 posts)

  1. samlesher
    Member
    Posted 5 years ago #

    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?

  2. Chrisber
    Member
    Posted 5 years ago #

    Why not just keep a backup copy of the modified file and reinstall it when you upgrade?

  3. samlesher
    Member
    Posted 5 years ago #

    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.

  4. scrat0i71
    Member
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic