How do I add a template to WordPress?
Author: WordPress Snippets | Posted on: March 1, 2019 |

In WordPress, we call a template the page templates, they change the appearance of a single page.
If you are looking at how to change the whole site appearance please check “How to add a WP template”, as this article won’t be helpful for you as it is created to explain the page templates.
That being said let’s go!
Adding a custom template is a dev task and you will need some coding knowledge. First login to your FTP and create a file [myTemlateName]-template.php . It really doesn’t matter how you will name them but I would recommend using suffix or prefix (template, page) that will quickly let you know that this is a page template.
Next, open the newly created file and on top add:
<?php /* Template Name: My Template Name */ ?>
After saving, the template will be visible inside the WP admin and it can be set on a page however, having the file only with the template tag won’t be of any use as it won’t show anything just a blank page.
For the page template to be fully functional you will need to input all the needed code inside based on your specifications and I’m leaving it up to that as you will need to do a lot of research and learning if you don’t know what is supposed to go in there starting with:
Get WordPress Header
Get WordPress Footer
WordPress Loops
WordPress Page Templates
Have a great one!
If you want to recieve the latest WordPress snippets, tutorials, tricks and useful information about web development, seo, social media marketing, google you can Subscribe to our newsletter. All you need to do is to fill the Subscribe form below, verify your Free Subscription in your email and start read our daily useful tips and tricks straight in your mailbox.
Note* we hate spam and our newsletter is powered by Google Feedburner and you will not get spam messages in your mailbox.
Leave a Reply