Skip to main content

How to Create a WordPress Custom Page Template?

WordPress Custom Page Template

Why We Create WordPress Custom Page Template?

WordPress CMS provide you to create custom layouts for all of your web pages. These custom layouts are called templates. So do you want to Create a WordPress Custom Page Template? You force notice that many WordPress websites have different designs for different web pages. A custom page allows you to have a different layout in appearance from default pages in WordPress. In this section, I will show you Create a WordPress Custom Page Template.

What is WordPress Custom Page?

In WordPress theme By default, it allows you to create posts and pages. Your WordPress theme manages the appearance of your pages by using a template file called page.php.

This template file changes all single pages that you build in WordPress. But problem is that all pages are not the same on the website. Little changes in their layout and appearance can make them different and a lot more valuable.

Creating a custom page template in WordPress needs a basic knowledge of HTML, CSS, and PHP.

Steps of Create WordPress Custom Page Template

1. Locate your WP theme’s existing pages.

Locate your WP theme's existing pages

2. Duplicate the file(In my case it’s Page.php).

Duplicate the file(In my case it's Page.php).

 

3. Rename .php file name to what you want(In my case it’s “JS-Beautifier-Page”) and open this file.

Rename .php file name to what you want(In my case it's "JS-Beautifier-Page").

4. In the top area add this code and below you will customize your layout.

<?php /* Template Name: JS Beautifier Page */ ?>

In the top area add this code and below you will customize your layout.

5. Now go to WordPress backed and in Page Attributes > Parent Choose your template(In my case it’s “JS Beautifier Page”). Then click on Publish.

WordPress Custom Page Template

We hope You like this article and it’s helpful to you add a custom page in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for Web video tutorials. You can also like our pages Facebook, Google Plus, Twitter, Linkedin, and Behance.

Leave a Reply

avatar
  Subscribe  
Notify of