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:
<?php
// 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.
Thanks
Tami