Saturday, November 5, 2011

Fatal error: Call to undefined function _make_cat_compat()

If you have the following error after uploading your WordPress, and re-uploading category-template.php didn't work, you could try pasting this function at the of the file.

function _make_cat_compat( &$category ) {
    if ( is_object( $category ) ) {
        $category->cat_ID = &$category->term_id;
          $category->category_count = &$category->count;
          $category->category_description = &$category->description;
          $category->cat_name = &$category->name;
          $category->category_nicename = &$category->slug;
          $category->category_parent = &$category->parent;
      } elseif ( is_array( $category ) && isset( $category['term_id'] ) ) {
          $category['cat_ID'] = &$category['term_id'];
           $category['category_count'] = &$category['count'];
          $category['category_description'] = &$category['description'];
          $category['cat_name'] = &$category['name'];
          $category['category_nicename'] = &$category['slug'];
          $category['category_parent'] = &$category['parent'];
      }
}

No comments:

Post a Comment

What's on your mind? Mind commenting?