This commit is contained in:
kate522 committed 2026-08-22 19:21:11 +08:00
1 parent 31e185664a
commit c6dcf9687a
4 files changed
+19 -11

No files matched your search

+1 -4
View File
@@ -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.
?>
<div class="sidebar aksrt-article-sidebar" role="complementary" aria-label="<?php esc_attr_e('侧栏', 'aksrt'); ?>">
<?php