Custom Page in WordPress

Custom Page WordPress : Have you ever create a custom page in WordPress ? If not then Today I will explain you how to create a custom page in the worpress.

As we know WordPress allow us to create post and pages . For custom page you must have a little bit knowledge of html or bootstrap, css and PHP

Creating a Custom Page in WordPress

create a file in notepad and give it extension .php

  • I create custom.php
  • Open the file and paste this codeĀ <?php /* Template Name: Custom */ ?>
  • Upload this fileĀ wp-content/themes/ directory
  • Login to wp-admin
  • Go to Add new page
  • On the Right Side under Page Attributes you will see Template choose Custom from that drop down and publish

custom page wordpress

In this way you can create a custom template in the wordpress

Editing Custom Page

As we know there should be same header and footer of the website. Steps to Include header and footer in Custom Template

open custom.php

<?php /* Template Name: Custom */ ?>
<?php get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<!-- custom code here -->
</main>
</div><!-- content-area -->

<?php get_footer(); ?>

In this way you can edit the template

If you like this post please subscribe to Technologies Axis

Custom Page in WordPress

You May Also Like

Leave a Reply

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