WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Code Removed – Now Site/Domain isn't working!

[Resolved] Code Removed – Now Site/Domain isn't working!

  • Hi everyone,

    I may have made a fatal mistake and was just wondering if anyone could help me recover.

    I removed a footer.php code from my WP and am now receiving the following error both when I try to navigate the backend of WP AND when I go to my website http://www.thebrownskingirl.com

    Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/thebrown/public_html/wp-content/themes/MonochromeMagazine/functions.php(14) : eval()’d code on line 5
    This theme is sponsored, all links in the footer should remain intact

    Of course, after having read that I tried to re-enter the code as it originally was, but I can’t even navigate the backend without getting the exact same code. Am I screwed?

    Can anyone please help out?

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator cubecolour

    @numeeja

    You can get the site working again by uploading a copy of the file you edited. Use an FTP app such as FileZilla for this.

    Then look for a new theme at http://wordpress.org/extend/themes/ which will not contain such nonsense. There is good advice about not downloading dodgy themes in this old article from themelab http://www.themelab.com/2009/12/08/stop-downloading-wordpress-themes-from-shady-sites/

    I have made the same mistake except in the header.
    This is how it looks like at the moment:

    <div id="header">
    	<div id="logo">
    		<h1><a>/"><?php bloginfo(<img src="<?php bloginfo('template_url'); ?>/images/amica_voce_logo_colour.jpg" alt="" />
    	<?php if (get_bloginfo('description') != '') { ?><div id="taglin
    	</div>
    </div>

    Could you please point me in the right direction what to do?

    Thank you

    Hi,
    I just found an old post as well advising to download the theme you use again, take the original stuff from it (in your case the footer) insert it then it should work.

    It worked for me.

    Thanks cubecolour. I downloaded Filezilla, but am still unsure how to upload the file. I have the code saved.

    Any advice on where/how to upload the footer code back into my website through Filezilla?

    I’m a newbie!

    Thanks.

    You will need to replace the whole footer file.
    On the left hand side of Filezilla you choose the file and on the right hand side you move towards ->wp-content->themes->yourtheme. Drop it there and when it asks then yes, you want to overwrite the file.

    Thanks.

    I uploaded the footer.php. I am still getting the script “This theme is sponsored, all links in the footer should remain intact” when I go to website and try to login into WP. I didn’t remove or edit anything in the footer.php.

    Did I miss something?

    esmi

    @esmi

    Forum Moderator

    Switch to another theme. Themes that enforce footer links are usually nasty spammy things than can insert all kinds of content into your site.

    Thank you all! I have switched to another theme and taken all your advice. Seems to be working now. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Code Removed – Now Site/Domain isn't working!’ is closed to new replies.