• I tweaked my index.php page very slightly (removed a graphic) and then started getting this error:

    Fatal error: Call to undefined function: get_header() in /home/inthatn/public_html/food/index.php on line 1

    It was working just fine and WP was installed a few days ago. I copied the code from a different index.php file (untouched and therefore should be ok). Still not working. From browsing this topic in the forums I thought maybe I should run /wp-admin/upgrade.php but still not working.

    Any ideas? Oddly enough, I can get into the admin section which I’ve had open in a browser all day. I don’t want to shut off the computer because I’m afraid I won’t be able to get it back!

Viewing 2 replies - 1 through 2 (of 2 total)
  • This “different index.php”… where exactly does it derive from?

    In any case, using WordPress 1.5.x, the index.php in your blog’s root should look something like this:

    <?php
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

    All the rest, such as functions like get_header(), should reside in your theme’s index.php, and not the blog’s root one.

    Thread Starter phisch

    (@phisch)

    Thank you, thank you, thank you!

    Until you posted that I hadn’t noticed there were 2 index.php files and I wrote over the one that’s in the root directory with the one that was from the themes directory.

    All’s well and again many thanks.

    (a BIG thanks to the WP volunteer community! you’re awesome and I don’t think you get enough thank yous)

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

The topic ‘Fatal error: call to undefined function…etc.’ is closed to new replies.