Auto Add Page
Hi, I’m building a Theme and need it to auto add a page when the user uses the theme.
What I need is for my functions.php file to check if the page exists and if not create it, if the user deletes it then functions.php (as it runs when a person accesses the site) will auto-recreate it again.
This page needs to have a slug of ‘add’ and also have a template assigned to automatically.
How can I do this thanks?
- The topic ‘Auto Add Page’ is closed to new replies.