0

Please make me correct where is the problem and what should i do,

i am trying to make my custom page template in wordpress. Also the default landing page,
What i did is, just created a file jp_home.php and set the Template Name: name here.

And then create a page with the name home and select the theme for the home page, second i went on the settings>reading> and select the a static page and select my home page as a landing page.

All these changes i have done in themes/twentyeleven/ template.

NOW the problem: in jp_home.php

<?php
/**
 * Template Name: WebTech Eleven
 */

//get_header('new');
?>

<!-- Wrapper Start -->
<div id="wrapper">
    Here is my Page
</div>
<!-- End Wrapper -->
<?php
    get_footer();   
//require("footer_old.php");
?>

after commenting the get_header() i am still viewing my header.php i don't know why?? and the rest part not visible. Can anyone please explain what wrong i have done?? ?>

3
  • Is that the entire file or is there an opening php tag above and a closing one below? You need to start with <?php before any php code in the file and at the end of all php code, you need to close with ?> Commented Sep 4, 2012 at 0:23
  • thanks for you reply i gave <?php tags but don't know why not showing here, but sure this is not the problem.. Commented Sep 4, 2012 at 0:26
  • can anyone tell me why giving me negative on this question?? Commented Sep 4, 2012 at 0:30

2 Answers 2

1

Well if you still see the content from the header and none of the changes/additions in your jp_home.php then WordPress isn't pulling up that template file.

It sounds like you're doing everything you need to but lets just review how to accomplish what you're looking for.

Ensure that you have jp_home.php in the twentyeleven theme directory. With that in place, go ahead and create your Home page. Select WebTech Eleven under the Template option and save the page. After that, go to your Settings > Reading and make sure that your Front Page is set to display a static page, and set that to Home.

Make sure you are then actually navigating to the correct home page and you'll see the new template in action (a good way to do this is to navigate to edit your Home page and click "View Page"). I just tested all of this locally and it works for me.

Very clear and concise tutorial here also: http://wsmithdesign.wordpress.com/2011/01/19/creating-a-custom-wordpress-home-page-template/

Sign up to request clarification or add additional context in comments.

1 Comment

thanks i did the same, means review all and then it works, didn't understand where were the problem, well thanks again..
0

Go to Pages -> All Pages and open the page you want to use the template on (THAT static page in your case). On the edit page, did you choose "WebTech Eleven" under templates?

Also, I must ask. Have you tried clearing cache on client side, and server side if you're using any cache there?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.