Hi, sorry if this is a dumb question or has been covered before, but I can't seem to find it.
I have seen passing mention of the ability in 2.0 to include a functions.php file that includes all the plugins for a theme, but I can't find any documentation about exactly how it is done. Can someone explain how to me how to create this file, or point me in the right direction?
Thanks in advance.
ps - 2.0 is great!
I have no idea how it works :) but the default theme has a file like that. You might be able to see what it has in it.
thanks, i had thought of that but forgot to poke around. i'm pretty excited by the possibility... not that i use a ton of plugins in my theme, but just enough that it kind of makes it not so special when i strip it of plugins for distribution.
if anyone else knows more about this, i'd love to hear it. for the time being, i'm going to see if it works to just more or less copy and paste all my plugin code into a functions.php file. i'll let you all know if it works.
It's pretty simple. For the active theme, WP 2.0 reads in the functions.php file just like it would an activated plugin: all the code, functions, etc. are acted on. Pretty handy, I think, especially when it comes to custom rewrite rules.
evaneco
Member
Posted 5 years ago #
Does this mean that all of my changes to the other .php codes are over-ridden by the functions.php file? Can I just remove/rename this file and go with the defaults I set up elsewhere?