Fix display under pages
[MAILPOET-2639]
This commit is contained in:
committed by
Jack Kitterhing
parent
1a1099013e
commit
fd33a53d50
@ -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;
|
||||
|
Reference in New Issue
Block a user