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.

This problem is quite complex and hard to describe so bare with me.

I'm trying to add a new sidebar to my test-page before I put it live.

Basically I've got a website with wordpress installed and inside this are 3 sub-directories for other websites. All the pages are linked using http://pastebin.com/gr594PxQ

All the sites use the same wordpress admin panel however they seem to use the default index.php template, some pages are different so they must use other templates but these arn't shown in the admin panel. I've yet to find out how to give my test-page a new template as you can't do it in the WP-ADMIN. If I could find out how to achieve this my problem would be simple to solve.

at the moment I've tried playing around with an if conditional so different sidebars will appear for different pages. My results return no sidebar at all which is whats confusing me.

Here is what I have.

http://pastebin.com/anUgJmkh

Many Thanks

share|improve this question

1 Answer 1

There is no way to add a page template through the WP-Admin screens in vanilla WordPress.

To create a page template, you simply create a new .php file in your theme's folder and add this comment to the top:

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

You will then be able to select that template from the page edit screen.

If you're using a theme developed by someone else, you will want to create a child theme first so that their theme updates don't erase your edits.

To learn more about creating templates and modding themes, check out these codex entries:

share|improve this answer
    
I think you misunderstood what I'm asking. –  Dannyw24 May 14 '13 at 14:17
    
I was going off of this sentence, "I've yet to find out how to give my test-page a new template as you can't do it in the WP-ADMIN. If I could find out how to achieve this my problem would be simple to solve." You can easily create template pages for each of your three "sub-directories" and then define what goes on each page. –  Burgon May 14 '13 at 14:20

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.