From fd33a53d50767dbfc49f326dbf6c5add9f8b8436 Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Wed, 5 Feb 2020 10:40:51 +0100 Subject: [PATCH] Fix display under pages [MAILPOET-2639] --- lib/Form/DisplayFormInWPContent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Form/DisplayFormInWPContent.php b/lib/Form/DisplayFormInWPContent.php index 6437e34514..042c60a9d6 100644 --- a/lib/Form/DisplayFormInWPContent.php +++ b/lib/Form/DisplayFormInWPContent.php @@ -39,7 +39,7 @@ class DisplayFormInWPContent { private function shouldDisplay(): bool { // this code ensures that we display the form only on a page which is related to single post - if (!$this->wp->isSingle()) return false; + if (!$this->wp->isSingle() && !$this->wp->isPage()) return false; $cache = $this->wp->getTransient(DisplayFormInWPContent::NO_FORM_TRANSIENT_KEY); if (isset($cache[$this->wp->getPostType()])) return false; return true;