Syntax for page_template using wp_insert_post
-
Using wp_insert_post (https://codex.www.ads-software.com/Function_Reference/wp_insert_post) I can set a value for the page_template key:
‘page_template => [ <template file> ] //Sets the template for the page.However, I’ve not been able to do this successfully and I think that’s because I need an example of the synatx used for <template file>–is it the name of the theme page, the filename, the filename with path?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Syntax for page_template using wp_insert_post’ is closed to new replies.