I’m running WordPress multisite and would like each site to have a specific page (with pre-loaded content) generated from a page template, contact.php. Rather than go through each site and create this page, I would like it to be created automatically by the theme. I plan to add all the content in contact.php itself. I’m assuming there is a way I can do this with a theme hack but have no idea where to start.
To put it more simply, the theme would automatically create a page at domain.com/contact from the template contact.php.
Put this in your
functions.php
file:What does it do?
If the contact page does not exist, create it.