• Resolved Anthony Laurence

    (@ant1881)


    I’m redesigning my site and transferring it into WP. I want to have a static home page (home.php) and then off shoot to another page to contain my blog. I’m creatively calling this page blog.php.

    Home.php works fine, but when I click on the link that I created to take me to blog.php, I get the error:
    Fatal error: Call to undefined function get_header() in C:\wamp\www\wordpress\wordpress\wp-content\themes\twentyten\blog.php on line 16

    Line 16 is the line with the get_header function.

    I’ve been researching this for the better part of my afternoon and the only times that I see this error come up are when people have changed the index.php file in the root folder, or some other such thing. I have not done that. I have only worked on the files that are within the Theme folder. I’ve triple checked to make sure that the home.php and blog.php are in the same directory(Themes).

    So what gives? Why is the function working fine on home but not on blog?

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    I want to have a static home page (home.php)

    Do not call your home page template home.php as this is a reserved filename on some systems. Try using something like homepage.php instead. Also see Creating_a_Static_Front_Page.

    Thread Starter Anthony Laurence

    (@ant1881)

    Thanks Esmi.

    My home.php was actually working great, it was the blog.php that was giving me fits.

    But…. I followed that link you gave and did those instructions, deleted the two pages I created and everything works fine now the way I want it!

    Thanks for the help!

    esmi

    (@esmi)

    No problem. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dreaded Fatal Error get_header() error’ is closed to new replies.