WordPress.org

Ready to get started?Download WordPress

Forums

This is how i handled the undefined function wp_get_theme() error (11 posts)

  1. hcscaladmin
    Member
    Posted 1 year ago #

    I am a newbie to wp.
    I applied a theme written for the latest version of wp to an older version of wp. so i got the undefined function wp_get_theme() error.

    This then blocked me from my access wp as admin

    I google the function name to learn this is a new function only in the latest version.

    So this is how i was able to upgrade without admin access.

    Using ftp, I copied all the files from the default theme twenty ten

    /www/wp/wp-content/themes/twentyten

    into my theme that was created only for the latest version of wp.

    /www/wp/wp-content/themes/wp-foundation

    this then allowed me to then log in as admin and upgrade by clicking the upgrade button. After the easy upgrade.

    I then restored the original wp-foundation theme files back to the folder and then logged in as admin and switched back my new theme that works great with the latest wp version.

    hope this helps someone.

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    ALl you need to do is rename the theme that is not working. ie - wp-foundationOLD

    renaming the theme automatically switches your site to using 2011 theme (or whatever theme is currently WP default)

    This allows you back in - similar idea, but probably quicker / less hassle

  3. hcscaladmin
    Member
    Posted 1 year ago #

    Well that is what i read, so i tried that and it did not work.

    i also moved it and deleted it.

    go figure?

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    That is pretty strange!

    After renaming/deleting/moving, did you visit your admin panel directly?

    like visiting the URL domain.com/wp-admin ?

    If I'm not mistaken, after deleting the theme, the act of visiting your admin is what triggers the reset to 2011 theme

  5. s_ha_dum
    Member
    Posted 1 year ago #

    I thought that visiting any page on the site triggered a reset.

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    @s_ha_dum -- that could quite honestly be true.... I believe my information comes from an old source.... and may not have been accurate even then....

  7. s_ha_dum
    Member
    Posted 1 year ago #

    :) I guess I have never specifically investigated it, honestly. I just have that impression... somehow, which, as we all know, is very scientific and quite reliable.

  8. kadacey@gmail.com
    Member
    Posted 1 year ago #

    I am having the same issue.

    How did you upgrade by getting around that error message. i cant even figure out how to log in. you used an ftp? can you give me more details?

  9. esmi
    Forum Moderator
    Posted 1 year ago #

  10. hcscaladmin
    Member
    Posted 1 year ago #

    the goal is first to switch to the default theme. Upgrading is secondary that.

    I am hosting word press on our own domain and servers. from wordpress.org

    So yes you would have to have be using this kind of install to do what i am saying.

    ftp access what not be new to you if you installed it this way. since that is how you install. if i remember right. i am a newbie to wp.org and dont know anything about wordpress.com or how it works.

    i am not sure if wordpress.com would throw this error.
    but google switching the theme without admin access

    if you do have ftp access. see my post above wp-foundation was the theme that locked me out.

    i backup up first, and then deleted all the files in my new themes folder and pasted all the files and folders from a theme that works under the old version.

  11. interphaseMedia
    Member
    Posted 1 year ago #

    Thanks Rev. Voodoo, that was fast (especially because it worked back-to-back on two sites!

Topic Closed

This topic has been closed to new replies.

About this Topic