(Wordpress) What does this error mean?

Discussion in 'HTML & Website Design' started by onedee, Feb 6, 2009.

  1. #1
    I have been trying to create a custom page in my Wordpress theme folder and have a link to it on the navigation. I was told I need make sure this single page can load in the browser. When I typed the address to this page in the browser I got the following error below

    Fatal error: Call to undefined function get_header() in /var/www/vhosts/mysite.plesk.freepgs.com/httpdocs/wordpress/wp-content/themes/mytheme/testpage.php on line 1


    My first thought was this is a permission related issue, but I went ahead and tried to change the permission from 755 to 777 for the theme folder but no luck. My question is what does this error mean?
     
    onedee, Feb 6, 2009 IP
  2. TheNoose

    TheNoose Peon

    Messages:
    1,005
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Basically it means that the code is trying to find the function get_header() and it's not finding it.
     
    TheNoose, Feb 6, 2009 IP
  3. QiSoftware

    QiSoftware Well-Known Member

    Messages:
    805
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    158
    #3
    Do you have something like this in your templates index.php file?

    <?php ^M/* Don't remove this line. 
    require('./wp-blog-header.php'); ?>
    Code (markup):
    Q...
     
    QiSoftware, Feb 6, 2009 IP
  4. onedee

    onedee Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Could not locate that line in the header.php file in the themes folder. Is that what I'm missing?
     
    onedee, Feb 6, 2009 IP
  5. TheNoose

    TheNoose Peon

    Messages:
    1,005
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes, you should have that file. If your template didn't come with one, try commenting out the first line on testpage.php
     
    TheNoose, Feb 6, 2009 IP