Fix code tại dòng 121 như sau:
if ( !empty( $post_type_object->rewrite['slug']) && $post_type_object->rewrite['slug'] == $term->slug ) {