Create new page function for theme options page
-
Hi,
I’m developing a theme that includes an option to add an amazon a-store and a site map. I’m writing template files to style the pages, but I’d like to add an option in the theme options to create a page. I know users can just create a page with the right slug, but I’d like to make it easy for them.
What I would like to do specifically, is to have a function that will check if there is a “store” page, and if one doesn’t already exist, to create it. I know I’ve seen a few themes or plugins that do this so I think it would be possible but I haven’t been able to find a guide or tutorial on how to do it.
Thanks for reading my question!
The topic ‘Create new page function for theme options page’ is closed to new replies.