diff --git a/src/Types/CustomPostType.php b/src/Types/CustomPostType.php index 84baeea..3c1cb2b 100644 --- a/src/Types/CustomPostType.php +++ b/src/Types/CustomPostType.php @@ -295,6 +295,9 @@ public function breadcrumbLinks(array $links): array } $post_type = get_post_type(); + if (false === $post_type) { + return $links; + } $archive_page_id = $this->getPageIdByPostType($post_type); if (0 === $archive_page_id) {