Fix Thesis Theme Custom File Editor Use_CodePress Errors in WP 3.0

By Posted 2010 Updated   BloggingWordPress

If you are using Thesis WordPress theme, and upgrading to the new WordPress 3.0, be prepared for some use_codepress fatal errors when using custom file editor on your blog admin.

Thesis Theme Custom File Editor Use_CodePress Error

If you are using the Thesis theme’s built-in Custom File Editor, you might spot PHP error messages like this:

Fatal error: Call to undefined function use_codepress() in /DIRECTORY/public_html/wp-content/themes/thesis_17/lib/admin/admin.php on line 42

The reason is Thesis theme calls on the function use_codepress – from the Thesis core file admin.php for syntax highlighting using CodePress, but the use_codepress function is now deprecated in WordPress 3.0. So the error appears. But there is a fix here.

Fix Use_CodePress error in Thesis Theme using WordPress 3

  • Power up your FTP program (I use Filezilla)
  • Browse to /wp-content/themes/thesis_17/lib/admin/admin.php.
  • Download admin.php
  • Open in a text editor like Notepad.
  • Locate this text in line 42
    if (use_codepress()) add_action('admin_print_footer_scripts', 'codepress_footer_js');
  • Comment out that line by placing two forward slashes just before it.
    // if (use_codepress()) add_action('admin_print_footer_scripts', 'codepress_footer_js');
  • Upload and replace admin.php

That should remove all the use_codepress errors, but you will not be able to use the syntax highlighter in your Custom File Editor after that. Remember to keep a backup of admin.php in case something goes wrong.

This site is also currently powered by Thesis theme and you can see our Thesis theme review here. I really wish Thesis developers have some way of sending out critical update emails to paid theme users, rather than they search around the forums.


16 comments on “Fix Thesis Theme Custom File Editor Use_CodePress Errors in WP 3.0

  1. Liz says:

    Thanks so much for this, mine works perfectly now.

  2. Jackie says:

    Thank you so much for the Fix on the Custom File Editor for WordPress 3 upgrade with Thesis….I was about to freak!!!!

  3. Jinnat Ul Hasan says:

    Thanks for the blog post. You solved my problem, found the link in Google.

    All the best, Cheers!

  4. Ruth Marie Sylte says:

    Thank you for saving me hours of frustration! This is a easy fix. I agree that Thesis developers should be proactively *pushing* this information to their paid users instead of making us forage on the internet for it.

  5. Ricky Melgares says:

    Thanks for the fix! I didn’t even get an error or anything (just a blank page).

  6. Emma says:

    Thank you! I would have never found this out by myself :)

  7. Faizan says:

    Thanks a ton! finally i got a solution!
    couldn’t bear it!

  8. Sagar Gholap says:

    Thanks a lot for the solution!

    I was very unhappy with it as I wasn’t able find solution to it since a week.

    Glad that QOT helped me fix it within no time :)

    Regards,
    Sagar Gholap

  9. Russell says:

    Thanks a lot,

    This has been doing my head in for about an hour.

    Much appreciated ;-)

  10. StickBoy says:

    Grr… why is this working for everyone else, but not for me?
    I have done as instructed and still get the error message. I have cleared my cache, done a forced reload (SHIFT+Reload). I downloaded the file again, just to make sure it had uploaded correctly. I even deleted the line in question and still got the message of an error from that line.
    I even tried opening in another browser, but same error!
    I am tempted to revert to an earlier version of WordPress, but I am afraid I may wipe out my content. Will restoring a backup revert WordPress?
    Is there a way for me to just re-add the support for use_codepress() to the present version of WordPress? If so, how?

    Thanks!

    • StickBoy says:

      NEVERMIND!
      lol
      Apparently I am an idiot.
      I inherited the site. I was making changes to the files stemming from the root directory. I just realized that there is *another* installation on the server, under the ‘wordpress’ directory. Oh, now it all works as advertised.
      Two days … I’m surprised I have any hair left….
      Thank you!

  11. Maryann says:

    now I am the one it is not working for. I have made the change to admin.php and uploaded, twice and I still get error message.
    any suggestions
    Many thanks in advance

  12. Sandeeo says:

    Thanks man …you are rocking…I’ve fixed my problem…its working for me :)

  13. Anuj@webtricksblog.com says:

    I usually don’t post on Blogs but ya forced me to, great info.. excellent! … I’ll add a backlink and bookmark your site

  14. Mark Lightfoot says:

    Fixed my problem in a jiffy thanks to this simple & straightforward post. Excellent and a big thank you. Made a point too of putting a note on the DIY Themes Facebook Page about this fix and your note about critical update emails to paid users. Keep up the great work.

  15. Angela Shelton says:

    Oh my gosh was I scratching my head over that error until I found your post. Hoooray you! Thank you so much for posting this.

Leave a Reply

Your email address will not be published. Required fields are marked *




Next Article »
css.php