diff --git a/src/Components/Breadcrumb/Crumb.php b/src/Components/Breadcrumb/Crumb.php index ee25d01..ec43b3a 100644 --- a/src/Components/Breadcrumb/Crumb.php +++ b/src/Components/Breadcrumb/Crumb.php @@ -251,11 +251,13 @@ public function build(): Collection $this->addCrumbsCollection($parentItems); } - $this->add( - get_the_title(), - null, - get_the_ID() - ); + if (false !== ($postId = get_the_ID())) { + $this->add( + get_the_title(), + null, + $postId + ); + } return $this->breadcrumb; }