So, According to the WordPress theme download page; the theme ‘Twenty Ten’ and it’s child theme/plugin ‘Responsive Twenty Ten’ are compatible with 2.8+
I’m stuck with using 2.8.5 at work, I don’t have an answer to why – but am.
I’ve uploaded both the plugin and the base theme manually – and was stoked to begin implementation of the graphical mock-up when;
Fatal error: Call to undefined function home_url() in /data/24/1/0/139/1815302/user/1967139/htdocs/wp-content/themes/twentyten 3/header.php on line 63
Anyone have any suggestions as to what causes this error and how to fix it?
Thanks for your response Chip; but I’m a little confused with your advice –
Your advising me to edit the header.php, but then your saying it will create more errors, so that’s not really an option then?
But your last suggestion seems like a good idea; how do I revert the theme to the old version? Is this something your suggesting I do in the code or is there a place I can download the old version?
Edit: On the download WP page for the ‘Responsive Child theme/plug in’ it says it’s WordPress 2.8+ compatible – the base version I downloaded didn’t specify it’s compatibility so it may very well be an updated version not compatible with 2.8 – though I feel like I’ve seen that theme for years, so hopefully I can find an older version and get it going with the child theme.
-cheers!
home_url() function is implemented in WordPress since version 3.0.0, and you are using version 2.8.5.
To fix this error edit
wp-content/themes/twentyten 3/header.php
file –replace:
with:
This is hotfix, and i’m afraid you will receive more errors like this.
“Responsive Twenty Ten’ are compatible with 2.8+” – as you see it’s not true 🙂
Best solution is revert theme to old one, or install newest wordpress version.
EDIT
It would be better to use
get_bloginfo( 'url' )
than$_SERVER
data.Ultimately, the problem is that the Theme you’re using isn’t compatible with the version of WordPress you’re using.
Solutions:
The migrated answer involves the latter solution. The specific error you’re getting is that the core template tag
home_url()
isn’t defined in WordPress 2.8.5, as it was introduced in WordPress 3.0. So, you will have to replace that template tag call, somehow. But, you very well may find other such incompatibilities, and would have to address each one similarly.To be honest, if you are unable to understand the original Fatal error message, I wouldn’t recommend going with the approach of trying to fix the Theme. Just update WordPress, or change to a WordPress 2.8.5-compatible Theme.