In this tutorial, we will be creating an according from the Elementor Loop Grid element. It will be a multi row accordion, meaning that the content will show up below the current row, even if there are 1, 2, 3 or more items in the row.
Yet it will all still be responsive, and on mobile, the accordion will be stacked as expected.
An added feature is that it is stable. Opening an accordion lower down the page, while another one is already open, won't create any change in the scroll position of the page, leading to much better UX. Normal accordions would change the scroll position, and then the users have to go and try to find where they were... none of that here.
We will be using the Elementor Loop Grid element, and a custom loop template.
See the demo here:
Features:
- Stable: no annoying change in scroll position.
- Fully responsive: 3 row on desktop, 2 on tablet, 1 on mobile? no problems!
- Design freedom: while my demo above is not going to win design awards, yours might! You can design the cards as you wish.
- Fully dynamic: we are using the Loop Grid element with the Loop template, so all the content is fully dynamic, from posts or a CPT.
- Ideal for team members sections
- Ideal for WooCommerce Products listings: works well instead of a quick view lightbox
- Easy to replicate: copy paste the templates
- NEW! Url Control: scroll to and open a specific accordion item on page load, from the url*
*Visit this URL for the demo: https://templates.element.how/elementor-loop-grid-multi-row-accordion-template/#rebecca-johnson
Let's get started!
First, let's get our loop template created
This is a premium tutorial. Purchase access to unlock the full tutorial.
10 Responses
You need to add the class name loopAccordionListing to the loop grid for this to work
Thanks Jake! I updated the tutorial with this information (that indeed I originally forgot).
Hi, thanks for the tutorial, I've been following your blog since 2021, recently I got some money to buy the premium access.
I have a question about this tutorial.
I need to change it so that the accordion appears to the right of the post card, instead of below, how can I do that?
Hey Simpplim!
Sorry this isn't possible with the current tutorial.
I don't really understand what should be happening with the content that's on the right too? Or would only 1 per line be shown?
Anyhow, I'd suggest trying with this tutorial here: https://element.how/elementor-show-hide-section/
Create your loop template as you normally would, but have a container in there that has the class 'toggleContent', and have a button with 'toggleElem'. Then place the accordion content within 'toggleContent'.
Cheers!
Is it possible to link to an opened accordion item similar to how you have it setup to link to an opened Popup in this tutorial? https://element.how/elementor-loop-grid-popup/
Greetings!
I updated the tutorial and code to have this feature. Please import the template for the Loop Grid again, and delete everything other than the HTML element, replace then one you had with the updated one.
For the rest, see the tutorial, the "URL control" part.
Cheers!
This doesn't seem to work for me at all. When I load the template into the loop grid, the button doesn't work, the bio just sits there open the whole time, it's off angled and not really in a grid at all. Is there a section of the tutorial missing?
Greetings Ryan!
Just to be clear, in the tutorial, there are two templates for you that you have to import: the Loop Template, and then on the page where you want this, the Loop Grid template.
Did you import both of these?
If so, I'd need to see your URL to find why it's not working as intended.
Cheers!
I have got it to work. Both templates have the same file name so I got confused.
Sorry about this... It's true that the naming isn't great when there is more than one template file to download in the same tutorial...