Oh, I see. The problem was that when you added the code directly in your PHP file, the post types had not been registered yet. So yes, moving the code to a callback hooked to 'init' (or 'wp_loaded") is the correct way to go about it. -- http://scribu.net