Unwanted modification of theme-files
-
Sorry for the very weird title, I just can’t figure out a better title.
Ok so, because I want flexibility of changing Themes, updating WordPress, … I hate writing code in the Theme-Files (for example: “footer.php”) to change something I want to change.
The sidebar on the other hand, is very easy to change through widgets. Which can be easily enabled/disabled and added/removed.
Is there any way to get this type of flexibility also in theme-files?
Not really drag & dropping widgets, but are there like some action hooks which can replace certain area’s in the theme-files?For example: I’ve written a plugin that should always show as last item on homepage, and also on a single post page.
(last item in content, so before sidebar/footer)Now instead of changing the Theme-files (page.php and home.php) and putting in a few lines of code
if (function_exists('name')) { name(); }
I just want it to go there automatically so I don’t have to change other themes later on, or change it again when I update wordpress…So my question is, is this possible to achieve? Or do I just have to stick with editing theme-files…
- The topic ‘Unwanted modification of theme-files’ is closed to new replies.