From cd59cf3eb8dbcdb0372168f889e459f74f562ebe Mon Sep 17 00:00:00 2001
From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com>
Date: Thu, 2 Apr 2026 21:33:14 -0500
Subject: [PATCH] Wrap main-top and main-bottom positions in conditional divs
Both positions already existed but rendered unconditionally.
Now wrapped with $this->countModules() checks so the containing
only renders when modules are assigned to the position.
Co-Authored-By: Claude Opus 4.6 (1M context)
---
src/index.php | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/index.php b/src/index.php
index 0df93e9..b801654 100644
--- a/src/index.php
+++ b/src/index.php
@@ -460,12 +460,20 @@ $wa->useScript('user.js'); // js/user.js
-
+ countModules('main-top', true)) : ?>
+
+
+
+
-
+ countModules('main-bottom', true)) : ?>
+
+
+
+
countModules('sidebar-right', true)) : ?>