Forums

Please help! index.php fatal error (15 posts)

  1. Ana32
    Member
    Posted 9 months ago #

    Hello everyone,

    I am in a big trouble here. I have created a twenty eleven child theme, everything was running good. I wanted to change the size of my header image, make it not as wide as it is by default. Anyways, I came across this article by voodoo: http://voodoopress.com/2011/07/customizing-twentyeleven-lets-start-with-width-and-smaller-header/

    Tried to add this to my functions.php in my child theme:
    //CUSTOM HEADER SIZE
    add_filter( 'twentyeleven_header_image_height', 'voodoo_header_height');
    function voodoo_header_height($param) {
    return 175;
    }
    add_filter( 'twentyeleven_header_image_width', 'voodoo_header_width');
    function voodoo_header_width($param) {
    return 1050;
    }

    I did change "voodoo_header_height" into "my_website_name_header_height".

    It didn't work out. So I tried to start a new functions.php with this piece of code in it instead of the old one.
    It messed up (somehow) with my index.php which I even didn't touch. Sorry, I am very new to all this stuff...

    Anyways, I cannot load my website now. All I get is this:
    Fatal error: Call to undefined function twentyeleven_content_nav() in /home/content/../..../html/wp-content/themes/twentyeleven-child/index.php on line 20

    As I understand, this is the line 20:
    <?php twentyeleven_content_nav( 'nav-above' ); ?>

    My question is what do I need to do to get back to normal?? Please, help!

    Thank you in advance for your comments and advices!
    Ana

  2. kmessinger
    Member
    Posted 9 months ago #

    Using ftp or by logging into your hosted account rename twentyeleven-child to xtwentyeleven-child. This will force wp to open with the default theme.

  3. Ana32
    Member
    Posted 9 months ago #

    Thanks for such a prompt reply, kmessinger! What should I be able to see after I follow your recommendation? Will I lose whatever was stored in my child theme folders, like plugins and custom changes different from a parent theme? sorry, I have never been in such a situation before.

  4. kmessinger
    Member
    Posted 9 months ago #

    No the folders will be there. Actually everthing will be there. This just lets you get back to the dashboard where you can correct the problem.

  5. mcconnelljh
    Member
    Posted 9 months ago #

    I'm guessing you removed the changes you made to functions.php? That would be my first suggestion. That will get you back to a solid starting point if it doesn't completely fix the problem.

    That line that you're bombing on looks like it's calling a function that's inside your functions.php file and the call is inside index.php so that's why that file is tanking on you.

  6. Ana32
    Member
    Posted 9 months ago #

    Okay.... if I understand it right, I need to recreate a functions.php like the one I had right before I made changes in it?

    mcconneljh, I did try to bring my functions.php file to its previous shape, but it just didn't do anything. Not sure what happened :((

    kmessinger, I do have my dashboard open 'cause I had two windows open at once: one with my main page, and another one with the editor open. How can I fix my problem from there? (Sorry, if my questions seem to be stupid. I am just soooo inexperienced here!)

  7. kmessinger
    Member
    Posted 9 months ago #

    See if you can change to the twentyeleven theme.

  8. Ana32
    Member
    Posted 9 months ago #

    I did activate twenty eleven from my dashboard. It said that it was successfully activated, but when I tried to go to my home page in a different window, it was just all blank, no nothing :((

  9. kmessinger
    Member
    Posted 9 months ago #

    In the dashboard click on your sites name in the upper left. That should take you to the site as it is. The other window may or may not be correct because of cache or other.

  10. Ana32
    Member
    Posted 9 months ago #

    Well, with twenty eleven activated, when I hit the name of my site in the left upper corner in the dashboard, the webpage looks empty. Just blank. If I activate my child theme, it gives me the previous fatal error sign. (Is it the right time to start crying now? :))

  11. mcconnelljh
    Member
    Posted 9 months ago #

    Once TwentyEleven is activated are all the files loaded correctly? Can you click the "Editor" link and see them all listed out?

  12. Ana32
    Member
    Posted 9 months ago #

    Looks like they are all listed the way they supposed to. I just opened a parent theme's main index .php file, it only has this:

    <?php
    // Silence is golden.
    ?>

    Is it the way it's supposed to be? So short? That's in twenty eleven.

    I feel really lost now. Can a child theme live without an index.php file at all? Should I just remove both functions.php and index.php from my child theme since the problem is between these two files?

  13. Ana32
    Member
    Posted 9 months ago #

    Would it help if I followed these steps and overrode my functions.php in the child them at all? http://venutip.com/content/right-way-override-theme-functions

  14. kmessinger
    Member
    Posted 9 months ago #

    Yes, that is how the index.php file is supposed to look.

    Under themes, did you preview the theme? How about twenty 11 ver. 1.2?

  15. suzyo
    Member
    Posted 5 months ago #

    @Ana32: did you find a resolution? I'm having the same problem; I discovered that ANY functions.php file in the child directory causes the fatal error. I'm using the twenty eleven theme. (If you delete the functions.php file from the directory in your child theme, then you should be able to get back to your dashboard and site.)

    I tried renaming the file to child_functions.php, but then the new functions didn't load. Does anyone know a solution?

    Thanks!

Reply

You must log in to post.

About this Topic