Title: 4levels's Replies | WordPress.org

---

# 4levels

  [  ](https://wordpress.org/support/users/4levels/)

 *   [Profile](https://wordpress.org/support/users/4levels/)
 *   [Topics Started](https://wordpress.org/support/users/4levels/topics/)
 *   [Replies Created](https://wordpress.org/support/users/4levels/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/4levels/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/4levels/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/4levels/engagements/)
 *   [Favorites](https://wordpress.org/support/users/4levels/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [Custom Taxonomies Plugin error when I upgraded to 3.0. Need my info back!](https://wordpress.org/support/topic/custom-taxonomies-plugin-error-when-i-upgraded-to-30-need-my-info-back/)
 *  [4levels](https://wordpress.org/support/users/4levels/)
 * (@4levels)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/custom-taxonomies-plugin-error-when-i-upgraded-to-30-need-my-info-back/#post-1541185)
 * [@fballoni](https://wordpress.org/support/users/fballoni/)
 * I got the same error as you
 * > Fatal error: Call to undefined method stdClass::get_results() in …/wp-content/
   > plugins/custom-taxonomies/custom-taxonomies.php on line 66
 * The issue is that the workaround wraps the call to initialize the taxanomies 
   in a function, that is afterwards hooked to load.
    All you need to do is declare
   the $wpdb var as global at the start of your function:
 *     ```
       62. $custax_taxonomies = array();
       63. function custax_register_on_init() {
       64.   global $wpdb, $custax_taxonomies;
       65.   //build the list of custax objects
       66.   $wpdb->custom_taxonomies = $wpdb->prefix . 'custom_taxonomies';
       67.   $custax_taxes = $wpdb->get_results('SELECT * FROM '.$wpdb->custom_taxonomies);
       68.   if($custax_taxes) {
       69.     foreach($custax_taxes AS $custax_tax) {
       70.       $custax_taxonomies[$custax_tax->slug] = new custax($custax_tax);
       71.     }
       72.   }
       73. }
       ```
   
 * You still need to apply the other 2 patches in the global taxonomies and posts
   php files.
 * Too bad WP doesn’t do proper error handling!

Viewing 1 replies (of 1 total)