Title: stringrv's Replies | WordPress.org

---

# stringrv

  [  ](https://wordpress.org/support/users/stringrv/)

 *   [Profile](https://wordpress.org/support/users/stringrv/)
 *   [Topics Started](https://wordpress.org/support/users/stringrv/topics/)
 *   [Replies Created](https://wordpress.org/support/users/stringrv/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/stringrv/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/stringrv/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/stringrv/engagements/)
 *   [Favorites](https://wordpress.org/support/users/stringrv/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Modify Page Title Outside of Header.php](https://wordpress.org/support/topic/modify-page-title-outside-of-headerphp/)
 *  [stringrv](https://wordpress.org/support/users/stringrv/)
 * (@stringrv)
 * [15 years ago](https://wordpress.org/support/topic/modify-page-title-outside-of-headerphp/#post-1808825)
 * 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?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Error on my pages. help!](https://wordpress.org/support/topic/error-on-my-pages-help/)
 *  Thread Starter [stringrv](https://wordpress.org/support/users/stringrv/)
 * (@stringrv)
 * [15 years ago](https://wordpress.org/support/topic/error-on-my-pages-help/#post-2101013)
 * 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?

Viewing 2 replies - 1 through 2 (of 2 total)