When I'm working in Wordpress, I quite often need to make adjustments to plugins. The recommended method, as I understand it, is to take the plugin file I'd like to modify (say,
mypluginfile.php), and copy it to my theme folder. The file will now override the plugin's version of the file.
My problem with this is that in order for it to work, the file HAS to be in the root of the theme directory...which means that the theme root quickly becomes incredibly messy. With adjusted plugin files strewn throughout the theme root, it's also very difficult to, at a glance, keep track of which file belong to which plugin.
Is there any way of modifying plugin files but still maintaining a nice directory structure. Maybe something like:
- /mytheme/style.css - /mytheme/functions.php - /mytheme/myplugin/mypluginfile.php - /mytheme/myplugin/mysecondpluginfile.php - /mytheme/mysecondplugin/anotherpluginfile.php
I have a hard time believing that everyone out there just fills their theme folder with an array of files belonging to different plugins. What's best practice here?