fatal error when creating a new page template or duplicating index.php
-
Hello everyone!
I want to change my homepage look, currently it is the index.php.
So, I thought to create a new template (homepage), and create a new page base on it (because I don’t want to change index.php, I want to keep it until I finish creating the new homepage).
I created a nepage.php, placed:
<?php /* Template Name:name */ ?>
and than copied all index.php after this code.When I’m viewing newpage.php I get an error:
call to undefined function get_header()– I tried to place instead, the content of page.php, but same error.
I don’t have templates in my theme, and the index.php is the front page actually.. would this be the problem?
——————
Maybe I need to do something else than creating a page template, because what I need is to create a copy of index.php, customise it, and then set it as my homepage.
But I cannot do that LIVE on the website, wp doesn’t accept 2 files like that (when I duplicate index.php I get an error on the website).Any help guys?
Thanks so much,
Shira
- The topic ‘fatal error when creating a new page template or duplicating index.php’ is closed to new replies.