Styling missing when using reusable blocks


I have what is perhaps a unique problem, but I’m curious to see of there’s a fix or, at the very least, understand what’s happening.

I run custom text ads using CSS on my site, circulated on the frontend by the Advanced Ads plugin. Recently, I looked into the possibility of designing the ads using Generatepress.

The solution I came up with was to create the ads in Generatepress and then set the ads as reusable blocks. Using the ‘Reusable Blocks Extended’ plugin, the ads were then given shortcodes. I then took the shortcodes and pasted them into the Advanced Ads plugin for circulation on the frontend.

What I’ve noticed is that the styling is missing from the frontend. I ran some tests and found that basic Wordpress blocks work fine, but Generateblocks blocks are not styled.

I think I kinda understand why, but it would be good to get some clarity and maybe, a workaround.

Many thanks in advance.

Hi MattFM, it is not a unique issue it’s the way the guys at GenerateBlocks have tried to ensure speed by not loading everything every time for every custom post type.

Here is an article about it : Adding content sources for dynamic CSS generation - Documentation

With this you can specify individual custom post slugs and the id of the reusable block you wish to display.

here is an example that should work (I am not a PHP dev, so I can’t tell you how to make this work on multiple post ids at the same time, but you get the idea).

In the code snippet in the link replace the “your_post_type” with “wp_block” and the ID of the post id if the reusable block you are trying to display…

stick that in the functions.php of a child theme or in some other code block plugin if you have one…

that will work for one, you will have to modify the code for multipl ids or custom post types.