Archived topic
Lists using custom container blocks
8 replies · Started by jlock01 on May 9, 2021
Hello,
I'm new to generateblocks and a bit confused on how I should be setting up an ordered list using a custom container block. I want this layout on my post:
1. List item number one
-------------
| img | txt |
| | btn |
-------------
2. List item number two
-------------
| img | txt |
| | btn |
-------------
What I have created so far is a container block that is a 2 column layout, with some content inside of it. That works great and looks good.
How would I go ahead and then put a bunch of these together into an ordered list?
Hi there,
Not sure I fully understand your question?
Have you tried to duplicate the same container then do a little bit of modification to each one?
https://www.screencast.com/t/3n4oOOF8qu
Let me know :)
Hi there,
Not exactly sure if I understand.
There isn't an ordered list block in GB but you can just use the duplicate option to recreate the layout you have then just modify the content as seen here:
https://youtu.be/_teF6vLd0HM?t=511
Does that help?
Thanks for the quick replies.
So my question is not about how to create the content blocks. It's about the best way to build an ordered list.
I want to end up with this HTML:
<ol>
<li>... custom block here </li>
<li>... another custom block here </li>
</ol>
Where should I add the ol and li tags?
If I try to add ol as an html block at the top of the list and /ol on the bottom it says the blocks are broken. Should the li block be a custom HTML block in the custom content container?
For example this doesn't work:
[HTML BLOCK] <ol>
[CONTENT BLOCKS] ...
[CONTENT BLOCKS] ...
[HTML BLOCK] </ol>
You can't make an order list using GenerateBlocks - you would need to use the list block from WP core instead.
My recommendation would be to build an ordered list using headline blocks from GB then just type in the number manually.
Let me know if this makes sense.
Just found this tutorial video. GOLD! Thank you! Would be nice to have all these videos in one place. Is there a "library" of them?
Hi there,
you can find them all on the GenerateBlocks YT Channel:
https://www.youtube.com/c/GenerateBlocks
And one for GeneratePress:
Perfect. Thank YOU!
You're welcome