WordPress Fix for GoDaddy Free Account
If you install WordPress on GoDaddy’s free web hosting account, your CSS on dashboard gets all messed up. GoDaddy.com injects ad code on every page they process and for some reason it interacts with WordPress dashboard CSS. There were fixes floating around the web, but they were not complete. I went ahead and modified the fix code a bit and now it works great. Hope you find this useful.
You first need to open
/wp-includes/script-loader.php
file and apply the following changes.
- Replace
echo "<script type='text/javascript' src='" . esc_attr($src) . "'></script>\n";
with
//*********************************************************<br /> // godaddy ads fix<br /> echo "<script type='text/javascript'>\n";<br /> echo file_get_contents( $src ) . "\n";<br /> echo "</script><!-- /wp-includes/script-load.php -->\n";<br /> //*********************************************************
- Replace
echo "<link rel='stylesheet' href='" . esc_attr($href) . "' type='text/css' media='all'>\n";
with
//*********************************************************<br /> // godaddy ads fix<br /> echo "<style type='text/css' media='all'>\n";<br /> echo file_get_contents( $href ) . "\n";<br /> echo "#conash3D0 { display:none; }\n";<br /> echo "</style><!-- /wp-includes/script-load.php -->\n";<br /> //*********************************************************
For those who don’t know it yet, you can also hide GoDaddy.com ad banner from your home page and admin login page. To do this, follow the steps below.
- For home page without ads
Open and edit
_
/wp-content/themes/<your theme>/style.css
_
and add the following line at the end
#conash3D0{display:none;}
- Similarly, for login page without ads
Open and edit
/wp-admin/css/login.css
and add the following line at the end
#conash3D0{display:none;}
Enjoy!
permalink: /2011/09/01/wordpress-fix-for-godaddy-free-account/
Leave a Comment