In this tutorial we will show you how you can create a Custom Page in WordPres using the custom page template snippet. Have you wondered how some people have completely different looking pages on their WordPress site or blog. A custom page is helpful if you want to have a page that looks completely different than rest of your blog but still runs on the WordPress CMS. You can also use it as a homepage or a landing page.
Customize Custom Page in WordPres
You will begin creating a custom page by opening a blank file in your text editor and paste the following code at the very top:
<?php /* Template Name: WPBeginnerT1 */ ?>
The above code is simply giving your template a name that you will later see that WordPress recognize, so we are calling our template WPBeginnerT1 but you can call it whatever you like for example, archive, contact, landingpage etc.
This page can use all php markups as your other pages can. If you need help you can use our WordPress Theme Cheat Sheet for Beginners. You can start out by calling WordPress header and footer, or you can go completely solo by doing everything in HTML.
If you do not call header.php, then you must make sure to add all the header information such as style.css and others.
Once you have completed editing this file save it and upload it in your theme directory (/wp-content/themes/yourthemedirectory/) where files like single.php and index.php are located.
Final Custom Page in WordPress
Next you will need to login to your WordPress admin panel and Add a New Page. Since you have already written down all the text and settings in the php file, simply name the page and leave the content area blank. Look on the right hand side, you will see a box called Attributes below the publish button. Choose the template using the drag down button. I hope you can enjoy with my artikel about Custom Page in WordPress.