#Posttemplate
What if you don't have an attribute+value pair? I would like to get the outside block's postId and have it available inside the nested PostTemplate posts where the postId is changed to the inner block's post ID.

Been stuck on this all week.
Have you also connected the attribute on the main query loop block to the 'providesContext' key on the block metadata? I typically do:

1. Add an attribute + value
2. ProvidesContext yourKey: "attributeName"
3. UsesContext in the child that gets yourKey

developer.wordpress.org/block-editor...
Metadata in block.json – Block Editor Handbook | Developer.WordPress.org
Starting with the WordPress 5.8 release, we recommend using the block.json metadata file as the canonical way to register block types with…
developer.wordpress.org
January 10, 2025 at 1:55 PM
#AI #ITconfrence #Posttemplate #Graphicdesign #IT Dm me for more work like this.
March 17, 2025 at 2:04 AM