Improved array handling for post type. - @unr