How to Use the Query Loop Block in GenerateBlocks (Query Loop Series Part 1)
Вставка
- Опубліковано 10 лют 2025
- In this tutorial, I'll walk you through the process of using the Query Loop block inside GenerateBlocks. We'll build a Query Loop from scratch, showcasing posts from a specific category on a regular WordPress page. This powerful feature allows you to dynamically display content tailored to your needs.
This is the first in a series of videos on getting the most out of the GenerateBlocks Query Loop block. In our next video, we'll make the Query Loop even more dynamic by automatically pulling in posts from the current category. Stay tuned for more!
Learn More
GenerateBlocks: generateblocks...
GeneratePress: generatepress....
Another tip is when the hierarchy list is open you can rename the blocks if your design is becoming a bit confusing. Like everything this is very simple if you know how. Right click the container and you can name whatever and Save
Thanks for this tutorial. Is there more info coming on the new CSS grid layout. Can't find much documentation or tutorials on it at present. I may be missing the simplest setting but I can't seem to get my grids to behave on mobile at all 😅. Thanks GB team
Hi,
Is there a way to limit the post title to just the first 2 or 3 words when the query loop fetches the posts? How do we setup a function for this that wherever a query loop is added, it should only show the first 2 or 3 words of the post title in a grid?
How can I use the new CSS Grid layout with the Query Loop block element? Or are you still forced to use GenerateBlocks Grid block element here? I've tried replacing the Grid element with a container I attach the css grid to, but then the query loop itself no longer works.
Correct me if you’re wrong, but you never used the inner container after you created it?
The downside is that Grid block in the Query Loop is still not the CSS Grid, but a flexbox with crutches :(