How to Create WordPress Custom Page Templates (& Why)
There are many many ways you can change the look of a specific page on your WordPress site. You can change the content inside the WordPress content editor. You can change the CSS rules that affect the site. Or create a new file in your WordPress theme’s template hierarchy to correspond to the specific page. Or you can use a theme page template designed specifically for that page. The last one is what we’re talking about here. In this tutorial we’ll cover both how to create a WordPress custom page template, and why you might want to do that. We’ll start with the why.
Creating Custom Templates in a Plugin Instead of Your Theme
Let me start this with a disclaimer: custom templates go in your theme. That’s what themes are for: giving you interesting ways to display your WordPress site’s data.
The Three Core Concepts of WordPress Themes
Two weeks ago we talked about the languages you need to know to make or modify WordPress themes. This week we’re focusing specifically on the most important of those languages for theme work, PHP. PHP is the language that the majority of WordPress is written in, it’s the part of WordPress that makes the server work in the right way.