Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In Wordpress, when creating a page, it shows some options for Template under Attributes, such as: Default, Links, One column no sidebar, etc.

Is there a way to add more custom templates to show up here? If so, how?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

All you need to do is just create a new file in your theme root directory. This file must start with following code:

<?php 
/**
 * Template Name: No Sidebars
 */ 

Name your file, for example, page_nosidebars.php and then WP will add No Sidebars template to available templates list.

There is nice article about it Creating Custom Page Templates. I think it will help you to create your own.

share|improve this answer
    
This doesn't seem to work for child themes? –  Click Upvote Jan 10 '13 at 8:26
    
@ClickUpvote You haven't mentioned about child themes. Anyway take a look at stackoverflow.com/questions/8946077/… –  Eugene Manuilov Jan 10 '13 at 8:37
add comment
You can create your own template for pages. Below link shows the example of creating template.

Url :- http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

create a php file and save in active theme folder.

<?php
/*
Template Name: Snarfer
*/
?>

i think this may help u for creating template.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.