Support » Fixing WordPress » Fatal error: Call to undefined function WP Default Theme

  • Resolved Inspired2Write


    I’m doing some troubleshooting on my site so I disabled all my plugins, and I also selected to revert back to the WP default theme:

    However, when I selected the default theme I’m getting an error message while in both the preview mode, as well as if I publish it, I get the same header error message on the front end. I was able to revert back to my preferred theme, but even though I’m not wanting to use the default theme, I would like to know why I’m getting this error with the default theme:

    Fatal error: Call to undefined function: home_url() in /home/myname/ on line 41

    Line 41 of the default template, is this code:

    <h1><a href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a></h1>

    Could it be caused by some other themes I have installed, even though they’re not activated? Or caused by what? Thanks in advance for your help. If you need to view my source code, the site is: linkandblog (dot com).

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


    Forum Moderator

    Line 41 in my version of Kubrick is:

    <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>

    Could you have a 3.0 default theme on a 2.9.1 install?

    Thank you Esmi,
    Yes, you were correct. I had accidentally deleted the WP Default theme, and rather than grabbing a copy of it from the 2.9.1 files, I took it from the url I provided above. Replacing that with the correct one eliminated the header error I was getting. It now has the same code on line 41 as what you showed.

    One problem down, but still others to resolve.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error: Call to undefined function WP Default Theme’ is closed to new replies.