How to add custom template to wordpress page or post
It is need to some pages of wordpress should be different for different pages or categories as per client requirements.but wordpress theme looks common for all pages and all posts. here we find simple steps to customize the wordpress theme templates.
just make custom template with your requirement.
add below code to start of the file.
upload it to wp_content/thems/your active theme folder via any FTP program.
go to admin panel of your wordpress and click add new link on pages left navigation.
then you can see a select box of templates on below attributes section on right side.
select custompagetemplate from template.
publish the page.
you can see a button view page.click it.
its done.
1
2
3
4
5
| <?php
/*
Template Name: custompagetemplate
*/
?> |
Simple Code
1
2
3
4
5
6
7
8
9
10
| <?php
/*
Template Name: custompagetemplate
*/
<html>
<body>
<h1>This is your customized template .</h1>
</body>
</html>
?> |
Download Example Template
custometemplate