Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question

migrated from stackoverflow.com Oct 19 '11 at 22:48

This question came from our site for professional and enthusiast programmers.

    
I too stuck with 0% accept rate, I don't have an answer to why... –  ariefbayu Oct 19 '11 at 21:31

2 Answers 2

up vote 1 down vote accepted

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:

home_url();

with:

'http://'.$_SERVER["SERVER_NAME"]

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.

share|improve this answer
    
Do not use $_SERVER data unescaped! –  Chip Bennett Oct 19 '11 at 23:23

Ultimately, the problem is that the Theme you're using isn't compatible with the version of WordPress you're using.

Solutions:

  1. (easiest, best) Upgrade WordPress from 2.8.5 to latest
  2. (still easy) Change to a different Theme, that is compatible with WordPress 2.8.5
  3. (harder, not recommended) Fix the WordPress-2.8.5 incompatibilities in the Theme

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.

share|improve this answer
    
Thanks; but I am unable to upgrade to the latest WP version where I work, that's why I'm having this struggle. And I have been searching hard for responsive WP themes that are 2.8 compatible. –  Frank Milo Oct 20 '11 at 14:41
    
@LouieLouie77 You're going to be hard-pressed to find a 2.8-compatible responsive theme. 2.8.5 was released in 2009, before many developers started making a push for responsive themes. Any newer themes that implement the features you want will likely be using newer APIs from WordPress. –  EAMann Oct 20 '11 at 16:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.