I am developing a WordPress theme and my theme contains multiple pages. I have added the static pages as templates and I know that in order to import these templates I have to go to the admin panel and using the Pages -> Add New option I can import the template. But I don't want my client to undergo this tiresome process. Instead, I want to do some coding so that the pages are automatically created. I guess I have to add some code in functions.php.

Please advise.

  • Why are you using WordPress if you’re not going to use it like a CMS? – Jacob Peattie Nov 7 '17 at 11:19

If you are creating a new theme either for sale of for a client you may want to have it create a custom page or pages when the theme is activated.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.