# Inner Gutenberg Blocks with The Loop Block

**URL:** <https://forum.pinegrow.com/t/inner-gutenberg-blocks-with-the-loop-block/7096>\
**Category:** Blocks\
**Tags:** bug, wordpress\
**Created:** [October 11, 2022, 9:23pm UTC](https://forum.pinegrow.com/t/inner-gutenberg-blocks-with-the-loop-block/7096 "2022-10-11T21:23:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThatWebsiteIsMe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thatwebsiteisme/32/4635_2.png) [@ThatWebsiteIsMe](https://forum.pinegrow.com/u/ThatWebsiteIsMe)\
**Post date:** [October 11, 2022, 9:23pm UTC](https://forum.pinegrow.com/t/inner-gutenberg-blocks-with-the-loop-block/7096/1 "2022-10-11T21:23:23Z")

</div>

Created a custom loop ( **The Loop** ) and added the **Block Inner Content** that sits under **The loop items container**. It will loop through the number of pages (or posts) but will not allow the child blocks to use the loop data. When I put the Gutenberg default Post Title or any of my own custom created blocks (eg a block using get\_the\_title(), Post Title, Page Title, the title etc) it pulls the viewed pages data and not the loop data.

Running a child block with php code var\_dump($loop\_query) returns variable undefined. $loop\_query being the query name I set in **The Loop**.

I can of course set a hard-coded title and access the loop data outside of the Block Inner Content system.

Ideally I am trying to make a more powerful loop block than the default one provided by WordPress.

Thoughts?

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [October 13, 2022, 11:23pm UTC](https://forum.pinegrow.com/t/inner-gutenberg-blocks-with-the-loop-block/7096/2 "2022-10-13T23:23:36Z")

</div>

@ThatWebsiteIsMe I don’t think this can work. The loop context and Block Inner Content are two separate worlds in WP.

---

<div class="post-metadata">

**Author:** ![ThatWebsiteIsMe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thatwebsiteisme/32/4635_2.png) [@ThatWebsiteIsMe](https://forum.pinegrow.com/u/ThatWebsiteIsMe)\
**Post date:** [October 15, 2022, 12:29am UTC](https://forum.pinegrow.com/t/inner-gutenberg-blocks-with-the-loop-block/7096/3 "2022-10-15T00:29:06Z")

</div>

That’s a shame - this would allow for some clever dynamic content query loops. In that case, I might look at how to learn [extending the Query Loop block](https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/extending-the-query-loop-block/).
