Custom fields not saving in newest WordPress 3.0.1

I put your code in a plugin and had to change two things to get it working:

  • In save_testimonial(), you use $post but don’t declare it as a global. So $post->ID will be empty, and update_post_meta() does not know what to save. Add global $post; at the beginning of the function.
  • register_taxonomy() is not in your init handler, and is probably called too early (if it is a plugin, maybe you were lucky when you did this in functions.php). Move it to the testimonals_register() function.

Did you have WP_DEBUG set to TRUE when you were debugging it? Then you should have gotten the warnings that lead me to this solution.