I Broke WordPress!!!
I am building a theme from scratch, as much as possible. I am doing this to learn, not because it’s practical. I have tried to use only snippets from the Codex here, although I did get my loop and my comments template from a tutorial.
I am building the theme on my machine, and I have it completed enough so that I wanted to move it to my host. It does behave properly on my machine.
After I uploaded it I found some strange things happening with my admin panel.
1) There is a comment from the comments function that is echoing out on the admin panel, top left, directly below the admin bar, the one that says “Howdy, Dave” on the right. It is the first line of the function, and commented out. It says “// Custom callback to list comments in the your-theme style”
2) When I try to save any different settings (like pages, reading options, etc…) I get a white screen with only that snippet. I have to press the back menu to get back to the admin section. Whatever setting I was trying to save is not saved.
3) I deleted the comment from the function and the snippet went away, but I still get the white screen when I try to save.
4) I then deleted all the functions I copied related to comments and still had the same problem.
5) I then deleted the other two functions related to registering my menu and registering my sidebar. (Both of these I copied from the Codex.) The problem remained.
6) I removed the funtions.php file from my theme entirely and solved the problem.
7) I took the functions.php from the twentyeleven theme. This caused the screen to turn white now when I try to switch tabs.
8) I took out the comments.php and still had the problem.
I just realized after re-reading this post that the snippet is also visible on my actual site. It is very hard to see because of the header background.
I have no idea where to go from here to figure this out. It seems that just having a functions file causes the problem. Removing it solves the problem, but of course I have no dynamic side bar or comments. Replacing it with another also breaks the site.
The site is http://www.emerginggeek.net. I will be happy to post any of my code if requested.
Edit: Update… I went back to my machine and found that the snippet was actually there, but the saving problem was not, so I suspect that it is two seperate problems.
- The topic ‘I Broke WordPress!!!’ is closed to new replies.