It is not just on the design front where you can benefit from using one main mother template theme and any number of child themes across your network: pure functionality can gain from this too. Remember, you can have your very own functions.php file for every theme, both the main one and the child themes, which means that you can, if you’re PHP-savvy, create plugin-like functionality on the theme side of things.
Another of the things people running multiple sites need to tackle is the maintenance of plugins. Granted, this is a lot easier these days, with upgrade functionality from within the WordPress admin interface, but some of the things you use plugins for can in fact be done just as well from within your themes. And while you can have those cool things in your theme’s template files, whether it is a mother or child theme, it just isn’t all that convenient.
Besides, the whole idea with themes in the first place is to separate design from code, so filling the template files with more PHP snippets than usual kind of works against that purpose.
This is where functions.php may be an acceptable middle ground. After all, it is a template file outside of the design part of the theme, existing purely to add extra functionality through PHP coding. So maybe it is a better idea to write general functions in the functions.php file of the main mother template theme rather than maintaining plugins that do the same thing across all sites? It is a thought worth considering to further ease the maintenance of several sites within a network.
There’s been a lot of recent buzz regarding theme frameworks within the WordPress community. You may wonder how child themes fit with that notion, and the answer is, of course, perfectly well. Most so-called theme frameworks are semi-blank themes that are designed for you to modify, using either child themes or similar concepts. Some want you to put custom code in folders within the theme, for example, so it pretty much depends on how the theme designer envisions the usage of the creation.
However, that doesn’t mean that you’re limited to doing it the way the designer intended. Any theme is really a theme framework, and any theme can be used as the mother template theme for a child theme. In other words, just because a particular theme framework author thinks that you should do things in a particular way, that doesn’t mean you have to. You can always just use the theme as the template theme, and then create your own child theme.
Some of the functionality in these themes designed to be used as frameworks for your own creations rely on action hooks. This is basically a way for the theme to pass implementation and data to the theme using functions.php. Then, your child theme (or pseudo-functions file within the theme framework if that’s the solution of choice) can do things with these action hooks, including removing them should they not be wanted.
So any theme is a theme framework, and the themes that try to pass themselves offas theme frameworks are basically just creations more suited for being used as the basis for new designs. That is worth keeping in mind, I think.
Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
This article was sent to us by:
Ron Dornes at
05192010
1. Developing Plugins for WordPress MU
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved.