Post Templates in WordPress...Finally

Erick Arbe 1 minute read
April 12, 2017

I know this has been out for a while, but I just happened to stumble across it. I build a lot of custom WordPress themes and I often use page templates to develop custom functionality. I don't usually have the need to give posts a specific template, but it would be nice, right? In the past I had to use a plugin to give WordPress this functionality but now it's finally baked in!

WordPress 4.7 brought about this change and here's how to do it:

Add that code to the top of your post template and you're good to go. You can even make specific templates for custom post types. This is such a powerful feature that really extends WordPress without having to build in any "hacky" work-arounds.