Jumprit's Knowledge

Jumprit's knowledge and references to share.

How To Create A Custom WordPress Page Template —

To create the new page template paste your HTML code into a text editor like Notepad, then paste the following PHP code directly above it like this:

<?php
/* Template Name: New Template Name */ ?>
<html>
Your HTML Code Here

Copy just the 2 lines of code above the <html> tag and paste it into your new template and change New Template Name to a name of your choosing. Save the new page template as a .php file. Something like front.php, and upload it to your hosting account in the template folder of your current WordPress theme. Don’t call your new template page.php! There is already one called that. In fact look in the themes directory to see what files exist to not create a duplicate.

Creating Your New Custom Page

Login to your WordPress Dashboard, click Write then Write Page.

Type a title in the title box, then look over to the right and click the Page Template drop down box, choose your new WordPress page template and click publish.

Done.. 😎


Categorised as: Wordpress



Leave a Reply