how do you assign the template to the page programmatically? I have all the templates I want, but I want to be able to assign new pages I create programmatically with a form. I can put the code to assign the template to the page in a widget, but I don’t know what code I should use for this. Any suggestions?
I fixed it just before reading this! lol but I did some of the things you mentioned, I activated the default theme and then I looked through some of my files and found a few that had some changes from the orignal install so I replaced those and then actived the theme.
Next thing, can you tell me how I can set a template for a page that I create when I hit submit on a form(using TDO Mini Forms)? I want to make a list of some templates from OptimizePress and some of my own, and then set the selected template to the page that is created.
I tried to use the theme switching:
in functions.php:
function updateTheme($theme){
update_option(‘template’, $theme);
update_option(‘stylesheet’, $theme);
update_option(‘current_theme’, $theme);
}
in the form:
updateTheme(‘OptimizePress’);
This is how I got into the errors I showed above. Any help?