Creating A Custom Page In WordPress With Custom Design

You may noticed in many WordPress theme while creating pages that it allow to choose the template. Well you can also create custom page with custom design in your WordPress theme or in any other WP theme. You can completely give it a new design which is different than the theme.

Today in this post I am going to tell you how to create a custom page in WordPress. it is really useful to add custom page template inside a theme when you want to create a page that looks different than the existing theme. Suppose all the page showing sidebars in default, but you want to create a page where you don’t want the sidebar. In this time it is really useful if you create a custom page template and you remove the sidebar from that template.

How to create custom page in WordPress?

So how you can create custom page template for your WordPress site where you can fully design it? There is a way or easy rules that can help you. here is what to do:

  1. create a PHP file with mycustompage.php inside the root of your WordPress theme’s folder.
  2. Add content in this PHP file that you like and add your custom design in it. you can create and add custom CSS, JavaScript etc inside this file. You can create it just like any other template file inside WordPress theme.
  3. Finally just add this line of code on the top of your PHP file with custom template name:
    <?php /* Template Name: My Custom Template */ ?>

This code simply tells WordPress that this is a template type file and it should be recognized as My Custom Template. You can give name for your template anything that you want as long as it makes sense to you.

That’s all you need to do. Now if you go to page editor or if you want to create a new page on your WordPress site then you will see the custom page template on right side of the page editor like this:

After publishing it or if you preview this page then you will see the custom page that you have created. This is the custom page that you created through WordPress. It was really so easy. isn’t it? now try it yourself and enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *