Create custom page template in Roots
Published on 10th Apr 2013
![Create custom page template in Roots](https://cdn.sanity.io/images/p65vchcy/production/fd5a36fcc6701b04314f8538b423db0c81425cce-1024x682.webp?w=1024&h=682&q=75&fit=max&auto=format)
First create a file inside wp-content/themes/roots
with this convention page-filename.php
. So in my case, I named it page-ajmalafif.php
.
Inside the file, you can customize what to include in it, by default (taken from page-custom.php
) it'll be;
1<?php2/*3Template Name: Ajmal Afif's4*/5?>6
7<?php get_template_part('templates/page', 'header'); ?>8<?php get_template_part('templates/content', 'page'); ?>
For the sake of simplicity, let's settle with that for now and we tweak it later.
This note was last updated on 24th Oct 2022,
by![Ajmal Afif]()
Ajmal Afif
![Ajmal Afif](/static/0a1a2e1e33e18e87e3bcd4a5cbe9387a/c0794/ajmal.jpg)