Ready to get started?Download WordPress


Plugin Theme Overrides (1 post)

  1. amummey
    Posted 4 years ago #

    Not sure how many people in the community have run into this issue or whether there is a good solution. The problem I often encounter with WP is that I need to customize the display of plugins which almost always includes hacking at the plugin source code. This in turn leads problems updating the plugin, because I will lose all the changes if I choose to automatically update.
    One solution to this problem would be as follows (similar to the way Joomla! does this):

    1. Encourage plugin developers to create template files for the plugin output, including separate HTML and CSS files.
    2. Either extend the current plugin class or write some code to look for template files for that specific plugin within the current theme directory
    3. If their is a template override in the current theme, use this, if not use the default template

    This kind of template overriding will encourage the separation of plugin function code and how it displays and would allow users to update plugins without break any display changes. Right now all of this is possible without making any changes to the WP core (I think). I feel that WP just needs to make some kind of recommendation on this. Anyone else thought of this issue before? Am I missing something?

Topic Closed

This topic has been closed to new replies.

About this Topic