Could we help you? Please click the banners. We are young and desperately need the money
When you work with additional functions like custom meta boxes within custom post types you might want to find the post_type of the current editing post. For example to work with only 1 metabox for different post types and add/remove certain elements depending on the post. Starting from WordPress 3.3 it's quite easy to fulfill this but it's hard to find this information online. So I hope I can help you out a little.
Just add the following function within your functions.php:
function get_wpadmin_post_type() { $screen = get_current_screen(); $post_type = $screen->id; return $post_type; }
Now you can simply callup this function from within any other function to get the post_type. I am sure you know how to do that 😉