Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Please help Have error on website now and all GoDaddy says is to delete theme (http://forum.bytesforall.com/showthread.php?t=15732)

heartsmakefamilies Oct 21, 2011 07:43 PM

Please help Have error on website now and all GoDaddy says is to delete theme
I hope that someone can help me. I have a fatal error on my website that says: "Fatal error: Call to undefined function home_url() in /home/content/52/5574752/html/wp-content/themes/atahualpa/functions/bfa_theme_options.php on line 7".

I called GoDaddy hoping to get help and they told me to delete the theme. I was able to open the file but I don't understand how to fix it. This is the file:


// http://example.com/home/wp-content/themes/atahualpa
$templateURI = get_template_directory_uri();

// http://example.com/home
$wordpress_base = home_url();

// /wp-content/themes/atahualpa/
$template_path = str_replace( $wordpress_base, '', $templateURI) . '/';

// example.com/home
$server_name_incl_wp_dir = str_replace("http://", "", $wordpress_base);

// /home
$wordpress_dir = str_replace($_SERVER['SERVER_NAME'], '', $server_name_incl_wp_dir);

// /home/wp-content/themes/atahualpa/
$css_img_path = $wordpress_dir . $template_path;

# $bfa_ata_widget_areas = get_option('bfa_widget_areas');
$bfa_ata = get_option('bfa_ata4');
if(isset($bfa_ata['bfa_widget_areas'])) $bfa_ata_widget_areas = $bfa_ata['bfa_widget_areas'];
else $bfa_ata_widget_areas = '';
$widget_form_string = '';
if (is_array($bfa_ata_widget_areas)) {
foreach ($bfa_ata_widget_areas as $widget_area) {
$widget_form_string .= '
<input type="checkbox" name="delete_widget_areas" id="' .
$widget_area['name'] . '" value="' . $widget_area['name'] .
'" /><label class="widget_area_label" for="' . $widget_area['name'] .
'">' . $widget_area['name'] . '</label><br />';

// Since 3.4.8, not activated yet, needs more code in css.php, js.php (3rd option), bfa_ata_admin.php ("New" tab)
// and bfa_ata_add_admin.php (Save js and css files in WP Uploads with each "Save Changes")
if (stristr(PHP_OS, 'WIN')) {
$slash = '\\';
} else {
$slash = '/';
$upload_path = str_replace( 'themes', '', get_theme_root() ) . 'uploads';
if(is_writable($upload_path)) {
$is_writable = "<span style='color:green;background:white'>Yes</span>";
} else {
$is_writable = "<span style='color:red;background:white'>No</span>";

/* make some of these variables global in functions in 3.5.0+ */

This is only half of it. I was hoping someone could tell me how to fix the issue. Please any help would be greatly appreciated.



lmilesw Oct 21, 2011 08:33 PM

Just upload a new copy of the file in question.

heartsmakefamilies Oct 26, 2011 08:19 AM

1 Attachment(s)
I'm hoping I was able to attach it. Its all on Wordpress. It was a large file. I wasn't sure how to make it smaller so I zipped it.

Any help you can give me would be greatly appreciated. I feel like a doe caught in car lights.

juggledad Oct 26, 2011 08:41 AM

there is nothing wrong with the file or the theme, but there might be a problem with your WordPress install.


Fatal error: Call to undefined function home_url()
this says that the function (small piece of code) called 'home_url' does not exist. This is part of the WordPress base code in the module 'link-template.php. So the two most probable causes are
1) the WordPress install did not install everything (link-template.php should be in the 'wp-includes' folder
2) somebody modified the code and removed this.
3) your on an old version of wordpress that did not have the function built in it.
what version of WP are you running?

heartsmakefamilies Oct 26, 2011 09:38 AM

1 Attachment(s)
Hi juggledad,

I think I'm running the WP 2.9.1 since GoDaddy is asking me to update it but I'm not sure. I had originally updated it on Wordpress. I can't get onto Wordpress at all now.

I did check and the link-template.php is in the file. I've included that file here.

I don't know how anyone would change the file since I haven't had any help since the girl originally set it up.

Any help would be so appreciated. I'm at a loss. I don't understand any of this.

juggledad Oct 26, 2011 09:55 AM

This is a new function that wordpress added and you are on an old version of wordpress. her is what you need to do.
using an FTP program navigate to the wp-contents/themes/atahualpa folder and rename the file 'index.php' to 'index.old' this should allow you back into your site with the twenty ten theme.

Next do a database backup and then upgrade wordpress.
Once that is done you can rename the 'index.old' to 'index.php' and you should be able to activate atahuala as the theme again.

heartsmakefamilies Oct 26, 2011 06:31 PM

I tried that but it still will not letting me. I'm still getting the message.

Fatal error: Call to undefined function home_url() in /home/content/52/5574752/html/wp-content/themes/atahualpa/functions/bfa_theme_options.php on line 7

juggledad Oct 26, 2011 08:22 PM

If you renamed the index.php to index.old it can't run. Do you have multiple copies of atahualpa in the themes folder? If so did you change he right one?

All times are GMT -6. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.