• Resolved kiwikol

    (@kiwikol)


    Just upgraded wordpress to 3.4 Got a fatal error

    Fatal error: Cannot redeclare class Custom_Image_Header in /home/article/public_html/slimmers.co.nz/wp-admin/custom-header.php on line 16

    It’s obviously to do with the theme.

    Not sure what to do.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Switch to the TwentyEleven theme (and make sure you’re using the latest version thereof).

    What theme is this? Can you link to it?

    Thread Starter kiwikol

    (@kiwikol)

    I haven’t got access to admin panel. If I FTP can I delete the theme I am using and will it go to default. Or is there a way to activate the Twenty Eleven Theme? Thanks for all your help.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yes, if you delete the theme it’ll revert to TwentyEleven.

    Thread Starter kiwikol

    (@kiwikol)

    writerwordpressthemedotcom

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Two things to try.

    1) Manually re-install WP

    2) Delete the theme folder for whatever theme it was you were using.

    Thread Starter kiwikol

    (@kiwikol)

    Thanks all done. Cheers for your help.

    Thread Starter kiwikol

    (@kiwikol)

    Marked as resolved.

    hello,

    I’ve found another solution.

    I wanted to stay with Back My Book theme, so, I’ve checked what had happened.

    In file “../wp-content/themes/back-my-book/admin/custom-header.php” there’s a declaration of a class Custom_Image_Header. It overlaps class that already exists in WordPress Engine – that’s the reason of fatal error.

    So, I’ve replaced name of this class to Custom_Image_Header_BMB (and other occurences – 3 occurrences all together in custom-header.php file), then I’ve renamed call to this class in “../wp-content/themes/back-my-book/functions.php” file.

    Line number 98:

    original:
    ————-
    $GLOBALS['custom_image_header'] =& new Custom_Image_Header($admin_header_callback, $admin_image_div_callback);

    changed to:
    ————-
    $GLOBALS['custom_image_header'] =& new Custom_Image_Header_BMB($admin_header_callback, $admin_image_div_callback);

    It worked for me. You can check it at https://henrykbaranowski.pl/

    I’m not a programmer, only ‘home-made screwdriver’ ;-), so, if someone can check if that’s all – I’d be very glad for feedback.

    Cheers,
    asceta

    asceta,

    Thank you for your post! I also did not want to lose the Back My Book theme, and am very grateful for your insight. I’m not a programmer either and was at a loss.

    I had to change the name of the custom_image_header line on a few other lines in functions.php, but after I did that – and after I re-activated all my plugins, all the error messages went away!

    Amanda

    Solved my problem. Kudos!

    Thank you, Asceta. This fix worked for me.

    Took a few attempts as Dreamweaver didn’t seem to like me trying to directly edit the files on the server, but once I chose to edit my local files instead and then PUT them on the server, it worked first time.

    Brilliant!

    Hello,

    I just created WordPress, I succeed to log in, but than, I got a error : Fatal error: Class ‘Custom_Image_Header’ not found in /www/seri.be/public_html/wp-includes/theme.php on line 1360

    I didn’t add my theme or any plug-in.

    I tried through yours suggestion but it doesn’t work for me.

    Anyone help me ? plz !

    i got this error. please help me resolve it!!! i am using back my book theme.

    Fatal error: Cannot redeclare class Custom_Image_Header in /home/booksfor/public_html/wp-admin/custom-header.php on line 16

    booksforme.com.au

    booksforme.com.au/wp-admin

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If the solutions in this thread do not resolve your problem, then it is likely you are not experiencing the same problem; in which case it is best to create your own thread.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Fatal error: Cannot redeclare class Custom_Image_Header’ is closed to new replies.