I have a large MultiSite network, and each page is designed a bit differently. I'm looking to write some custom code to automate the setup of a new blog as much as I can.
Things I'm looking to do for every new blog:
- Activate a theme
- Create some new pages (contact, about us, etc.)
- Add and configure some widgets
- Etc.
I'm completely willing (even eager) to write custom code to make this automation happen. However, I'd like to leverage as much existing code as possible. What recommendations do you have in order to make this happen?
I know that I can use wp_insert_post()
to insert posts and pages, but how should I go about activating a theme, enabling widgets, etc.?