From c6dcf9687a405e4d463c7100002740a1fb3c6051 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Aug 2026 19:21:11 +0800 Subject: [PATCH] fix --- inc/helpers/aksrt-single-aside.php | 5 +---- inc/helpers/aksrt-single.php | 2 +- inc/helpers/template-tags/site-layout.php | 13 +++++++------ tests/widget-system/post-visual-contract.test.cjs | 10 ++++++++++ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/inc/helpers/aksrt-single-aside.php b/inc/helpers/aksrt-single-aside.php index 1fc4379b..551bb03a 100644 --- a/inc/helpers/aksrt-single-aside.php +++ b/inc/helpers/aksrt-single-aside.php @@ -16,13 +16,10 @@ if (!function_exists('aksrt_single_render_aside')) : function aksrt_single_render_aside(array $ctx): void { $post_id = (int) ($ctx['post_id'] ?? get_the_ID()); - if (get_post_type($post_id) !== 'post') { + if (get_post_type($post_id) !== 'post' || empty($ctx['show_aside'])) { return; } - // The body site-layout-* class owns visibility. Always render the post - // sidebar so User-Agent or request-specific context cannot remove widgets - // from an otherwise two-column article page. ?>