WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Fatal error: Call to undefined function WP Default Theme (3 posts)

  1. Inspired2Write
    Member
    Posted 4 years ago #

    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:

    http://wordpress.org/extend/themes/default

    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/mysiteurl.com/wp-content/themes/default/header.php 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).

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    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?

  3. Inspired2Write
    Member
    Posted 4 years ago #

    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.
    THANK YOU ESMI!

Topic Closed

This topic has been closed to new replies.

About this Topic