Title: Preselected post template
Last modified: June 20, 2022

---

# Preselected post template

 *  [rhcpablo](https://wordpress.org/support/users/rhcpablo/)
 * (@rhcpablo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/preselected-post-template/)
 * I want to preselect a custom template based on the URL. For example, if I open
   the URL “[https://www.suncadiacabinrental.com/wp-admin/post-new.php?tmpl=MyCustomTemplate&#8221](https://www.suncadiacabinrental.com/wp-admin/post-new.php?tmpl=MyCustomTemplate&#8221);
   I want the template “MyCustomTemplate” is preselected instead of “Default template”.
   Is there a way to do that adding a function to functions.php?
 * Thanks!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpreselected-post-template%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Preselected post template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-post-template.svg)
 * [Custom Post Template](https://wordpress.org/plugins/custom-post-template/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-template/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-template/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-template/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [rhcpablo](https://wordpress.org/support/users/rhcpablo/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/preselected-post-template/)
 * Status: not resolved