• Resolved campbelson

    (@campbelson)


    Hello,

    I am trying to have a customized page template. Thus I just did a duplicate of page.php, named it AZ.php and made a link to it from menu. However I get that error message when loading that AZ.php:
    “Fatal error: Call to undefined function get_header()”

    I dont understand as it is exactly the same php file as page.php and is located in the same folder…
    I just used a different file name for it and linked to it well since it refers to the first line of code, that is the get_header(.

    Any idea? thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thus I just did a duplicate of page.php, named it AZ.php and made a link to it from menu.

    Bzzt! Wrong! See Creating_Your_Own_Page_Templates

    Thread Starter campbelson

    (@campbelson)

    Ok, thanks,
    I did register the page template and can see it in the editor as “AZ page template”.

    But I still get the same error trying to open that page in the browser.

    Did you follow the instructions in the page I linked to above? Did you publish the resulting page? Are you linking to the published page (as opposed to its template)?

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

The topic ‘Fatal error: Call to undefined function get_header()’ is closed to new replies.