• Just uploaded and activated theme called:
    cp-minimal 1.0.5

    When I enter the url of my blog it says:

    Fatal error: Call to undefined function unregister_widget() in /home/mydomain/public_html/domain.com/wp-content/themes/cp-minimal/functions.php on line 49

    Ok I can live with that, just go to wp-admin and unactivate that theme.

    BUT, when I try to go to wp-admin it gives me the same error, I can not login to unactivate it!!!!!!

    How is that possible???

    Please help, how do I fix it when I can not login to dashboard????

Viewing 7 replies - 1 through 7 (of 7 total)
  • FTP into your site (or use whatever file management application your host provides) and delete the wp-content/themes/cp-minimal folder.

    You can try renaming that function.php file so it does not get called and then cause the error. Then you might be able to login to deactivate the bad theme.

    That’s all very well, but then you’d likely have several calls to non-existent functions which result in further errors.

    You know, the kind that go like..

    Call to undefined function …etc

    Removal of the theme would be the wise approach, unless you’re able to fix the problem functions yourself, or alternatively post the problem lines here and maybe the lovely people that offer help and advice will aid you in fixing the error… ??

    Themes do not require a functions.php file to render so no errors will result. I have verified this on a test installation of WordPress. This will at least allow the user to render their site while they fix the function that is causing the error in the theme.

    I renamed the active theme to test esmi’s suggestion and came up with a blank screen so not sure if that is the wisest approach.

    Themes do not require a functions.php file to render so no errors will result.

    I beg to differ. There are many themes that rely heavily on custom functions. I’m not sure why renaming the current theme folder didn’t work in your case. In theory, it should have the same effect as deleting the folder – ie activate the default theme.

    Themes do not require a functions.php file to render so no errors will result.

    That was not what i was getting at (and i’m not saying this simply to debate/argue, see below).

    My point being that there may be function calls throughout the theme(index, header, whatever) to functions defined in that file, once those functions no longer exist, you in turn will get errors…(it may not be the case – but we don’t know at this point).

    It’s possible custom functions don’t exist in that file, but it’s also possible they do…

    Points taken. I successfully installed the cp minimal theme

    I did not run into the issue described by expozitum

    This is the code that seems to generate the error

    // unregister the standard search widget
    function cp_unregister_widgets()
    {
    	unregister_widget('WP_Widget_Search');
    }
    add_action('widgets_init', 'cp_unregister_widgets');

    xpozitum can you confirm that is the code in your function.php

    I found a related post that may help

    https://www.ads-software.com/support/topic/306867?replies=2#post-1196873

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Help – new theme causes inability to login!!’ is closed to new replies.