From 275c0d74cd68677622a5431505c5c870c473063d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 29 Mar 2026 21:40:15 +0000
Subject: [PATCH] =Seems to be working, huzzah! Added some changes for on-this-page nav

---
 inc/blocks/CustomBlocks.php |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/inc/blocks/CustomBlocks.php b/inc/blocks/CustomBlocks.php
index ffb46b8..f0c0f9d 100644
--- a/inc/blocks/CustomBlocks.php
+++ b/inc/blocks/CustomBlocks.php
@@ -18,7 +18,7 @@
     {
         $this->cache = Cache::for('blocks', WEEK_IN_SECONDS);
 		$this->cache->connect('post')->connect('taxonomy');
-		add_filter('render_block', [$this, 'render'], 990, 3);
+		add_filter('render_block', [$this, 'render'], 900, 3);
 
         add_action('init', [$this, 'registerBlockStyles']);
     }
@@ -613,10 +613,14 @@
             'main';
 
         if ($content == '') {
-			global $post;
+			if(is_singular()) {
+				global $post;
 
-			$block['innerBlocks'] = parse_blocks($post->post_content);
-			$result = $this->innerBlocks($block);
+				$block['innerBlocks'] = parse_blocks($post->post_content);
+				$result = $this->innerBlocks($block);
+			}else {
+				$result = '';
+			}
         } else {
             $result = $this->inside($block, $tag, $content);
         }

--
Gitblit v1.10.0