From f06ff54c45ad530f3810dd698110e90ba45fd58c Mon Sep 17 00:00:00 2001 From: Tosin Oguntuyi Date: Tue, 15 Oct 2024 17:58:52 +0100 Subject: [PATCH] Add post status to WP_Query to allow fetching of trash events --- .../blocks/event-template/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/themes/wporg-translate-events-2024/blocks/event-template/index.php b/themes/wporg-translate-events-2024/blocks/event-template/index.php index 0d39dc67..662392dc 100644 --- a/themes/wporg-translate-events-2024/blocks/event-template/index.php +++ b/themes/wporg-translate-events-2024/blocks/event-template/index.php @@ -12,8 +12,9 @@ $query = new \WP_Query( array( - 'p' => intval( $attributes['id'] ), - 'post_type' => Translation_Events::CPT, + 'p' => intval( $attributes['id'] ), + 'post_type' => Translation_Events::CPT, + 'post_status' => array( 'publish', 'draft', 'trash' ), ) );