WordPress.org

Ready to get started?Download WordPress

Forums

I Broke WordPress!!! (3 posts)

  1. emerginggeek
    Member
    Posted 1 year ago #

    Hi all.

    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.

  2. Mohd Rafie
    Member
    Posted 1 year ago #

    I'm sorry but if you're building things from scratch, you should know where the snippets are coming from.

    I might not address your problem, but I suggest that you start with child theme to understand theme layout and structure.

    Twentyeleven or twentytwelve would a great start! :)

  3. emerginggeek
    Member
    Posted 1 year ago #

    Thanks for your suggestion.

    I actually do know where the snippet is coming from, just not why or how.

    As for twentyeleven or twentytwelve, I have played with them. But what I am doing right now is not for public release or consumption, but a practical excersice to help me learn.

    Just curious, are you saying the problem is so simple that I would see it right away if I had done a few more child themes?

Topic Closed

This topic has been closed to new replies.

About this Topic