The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Other › Where to store php scripts in WP theme
Where would you guys store your own scripts in a WP theme?
I have a php script to process a form, would you put this in the root of the site or the root of the theme?
Just wondering what was best practice.
I would just put it in the existing functions.php actually.
I try to keep anything that is specific to the site at hand inside the theme folder that I’m using. This is really only an appropriate approach when you’re dealing with a custom set up where you don’t expect the user to be changing themes.
Never thought about the functions.php although in this instance I think I’d rather keep this separate.
It is a custom theme and it won’t be changing so I’ll go for the second option.