• Resolved BlackCatGFX

    (@blackcatgfx)


    I was trying to edit the functions.php on the site to make it so the author’s name wouldn’t be shown in posts. I tried through the editor in the dashboard, but everytime I tried to update, I got a “No Data Received” error. So I read a post saying it could be an issue w/ GoDaddy hosting, to try to edit the file through the hosting manager at GoDaddy. Well, I used FileZilla instead, but logged in, and I believe my first error was I never thought there might be more than one functions.php file in there. I edited the /wp-includes/functions.php file. Before I changed anything, I made a functions.bak.php and saved it locally (shoulda saved it on the server). Anyhow, the change didn’t work, I got some error, and decided to just not mess with it, and uploaded what I thought was the .bak file, but with so many windows open on 3 screens, something got mixed up, and after I uploaded and overwrote w/ what I thought was the original functions.php file, I get an error at the top of the home page that says-

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at/home/content/24/9255024/html/WordPress_New/wp-includes/functions.php:1) in /home/content/24/9255024/html/WordPress_New/wp-content/themes/garage/functions.php on line 20

    I can still navigate around the site, but cannot get into the dashboard and I almost logged out so I could log back in and see if that helped, and I got a warning that basically said “Do you really want to log out? You won’t get back in”

    So now I am stuck, I have no idea what I screwed up, I’m fairly competent most of the time, but I’ve been up for 2 days and on meds, so I guess I pushed it too far. I desperately need help if anyone has any idea of how I can fix this.

    This is the site I’m working on.

    https://narcoticofficersmagazine.com/WordPress_New/

Viewing 8 replies - 1 through 8 (of 8 total)
  • First of all, you shouldn’t be editing core files. Second of all, you can use simple CSS to not show the author’s name which would require either making a child theme or a Custom CSS plugin.

    Thread Starter BlackCatGFX

    (@blackcatgfx)

    Well, thanks for the help…not. I said I was tired, I should’ve quit hours ago and I know there’s plug-ins, and yes I have a child CSS as well. I’m sure you have never screwed anything up.

    Restore the file as it was that you messed up.

    Next, use the stylesheet in your child theme and add this code:

    .articles h3{
       display: none;
    }
    Thread Starter BlackCatGFX

    (@blackcatgfx)

    I can’t restore it I guess, now I am getting this, can’t get to the site at all-

    Fatal error: Cannot redeclare mysql2date() (previously declared in /home/content/24/9255024/html/WordPress_New/wp-includes/functions.php:26) in /home/content/24/9255024/html/WordPress_New/wp-content/themes/garage/functions.php on line 42

    I mixed up the bak and the edited files, and now I don’t have anything to restore it with.

    First, since you edited a functions.php file in the core, upload a fresh copy of WordPress (don’t upload the wp-content folder).

    As for the functions.php in your theme, go to line 42 and remove that line.

    Thread Starter BlackCatGFX

    (@blackcatgfx)

    Thank you for the help, I was kind of on that track. I still managed to mess it up, I’m so tired that I mistook wp-content and wp-includes, and the content started to upload, but I caught it pretty fast and stopped it. Now the theme is up, no error messages, I can log into dashboard, but everything is shifted over to the right or something, you kind of have to see it to know what I mean.

    https://narcoticofficersmagazine.com/WordPress_New/

    I’m guessing some thing in the CSS is wrong, I don’t know which “wp-content” files got by me before I stopped it, only one I’m sure of is the index.php, I’m not trying to fix anything else until after I get some sleep, I’m obviously beyond usefulness right now. I appreciate your help, I’m really not an idiot, just tired and I have a chronic health problem that requires some heavy pain meds. I should’ve stopped hours ago, but I was undewr pressure, should’ve known better though. If you could just point in the right direction so I’ll know which way to go when I can resume, I would appreciate it greatly. I’ll owe you a few cold beers. ??

    (And I’ll never edit core files again.)

    I am glad the site is up and operational again. Normally, a CSS error won’t bring down a site, but a simple PHP error can!

    You can go to the style.css file in your child theme and add the code I provided.

    By the way, I don’t drink beer so just your appreciation itself will do. ??

    Thread Starter BlackCatGFX

    (@blackcatgfx)

    Thank you very much for your assistance, all is right in the world again.

    +rep

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Functions.php Problem’ is closed to new replies.