This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: Custom page template

#1478
Jason Bobich
Keymaster

This isn’t anything specific to the theme, and there is nothing stopping you from creating a file in your Child theme called page-{slug}.php that targets a specific page with that slug. However, it sounds like you’re getting mixed up between targeting pages with theme files and creating “Page Templates” —

What you’re describing by making files page-{slug}.php is creating a theme file for a specific page with whatever slug, but I think you’re actually wanting to create a “Page Template” that you select from when editing pages.

http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

The theme doesn’t need a function to register page templates, as that’s not how WordPress works. It doesn’t matter what you name the file . WordPress just scans the theme directory and adds any theme files that have a Page Template title at the top as the page templates the user can select.