Generateblocks not working in template parts

I’m trying to use generateblocks (container, buttons) in full site editing template parts (header, footer).

In the editor the styles and customizations are displayed correctly but in the final rendered page none of the styles are loaded/applied to the blocks.

I have tested in a clean wordpress installation.

Hi Luistar15,

You might wish to try something like this: Adding content sources for dynamic CSS generation - Documentation.

Kindly modify it to suit your structure.

Hope this helps! :slight_smile:

Hi @luistar15 , I ran into the same problem specifically with template-parts in full site editing and I fixed it with the code in this blog post.

If you have multiple parts you want to watch such as the header AND footer, you can wrap that in a loop and just loop over an array of part names.

Hope that helps!