Looks like the same issue that happened for taxonomies, but this time I think it is for archive template object. Need to check for this before attempting to access it.
edit: I think still the same thing happens for any post type that has pages but does not have an object!
Will need to do some more updates to this function.
Looks like the same issue that happened for taxonomies, but this time I think it is for archive template object. Need to check for this before attempting to access it.
edit: I think still the same thing happens for any post type that has pages but does not have an object!
Will need to do some more updates to this function.