Site logo

Archived topic

Load Generateblocks css in WpShow Post content

3 replies · Started by Daniel on June 3, 2021

Viewing posts 1–4 of 4

Hi!

I'm making a restaurant menu template with GeneratePress and Generateblocks. It is being a delight how easy it is to layout it thanks to Generateblocks.

For the demo I'm making a one-page website where I show all the dishes of the restaurant menu. I was laying out all the dishes with Generateblocks on the same page but I have seen that the Gutenberg editor starts to work a bit slow when there are many blocks on the same page.

So just to test, I created each dish as a blog post with Generateblocks. Now I want to show the content of the posts with WpShow Posts but the problem is that it doesn't load the dinamic generateblocks css.

So I wanted to know if there is a way to load the generateblocks css outside the page where it is used.

Maybe it's not possible so could you give me some other suggestions on how to show the content of the posts that I've made with Generateblocks outside the post's page?

You can see the demo here: https://www.netropol.es/demo/restaurante/ and the block where I used WpShow posts with the title WpShowPosts Shortcode

Hi there,

not easily - as each post is going to create its own unique CSS styles for the GB Blocks being used.
If you were using GB Pro - and every block was given a Global Style then this would generate a single global style sheet used on all posts - with that CSS loading you could copy and paste it into your own style sheet.

Thanks for your reply David!

I figured it wouldn't be easy to do. I can fix it by creating custom css styles. That's no problem.

Anyway, can I suggest it as a new feature in an upcoming version of Generateblocks or WpShow Posts?

I think it would be a very powerful feature to be able to create the content of a post with Generateblocks and then show it in a post query. That opens up a lot of possibilities.

I've used it for a restaurant menu but I can think of many cases where having a layout made with Generateblocks can be very useful for all kinds of categorized listings.

Appreciate the feedback - we have some plans to blockify WPSP, so that kinda thing should be easily done :)

This archived topic is closed to new replies.