-
AuthorPosts
-
November 18, 2019 at 11:25 am #1157797
Hi,
I’m trying to add an image gallery inside an accordion, and can’t get it to work. When in the accordion element, you get the text editing box with the magic wand to add theme shortcodes, but it’s a very small selection of shortcodes. So, I tried adding a default WordPress gallery, but that’s looking horrible and weird. How can I get this accomplished? I don’t really care if I have to use the default WordPress gallery, but as I’m handing the site off to a client, it needs to be easier than manually adding each image id individually to a shortcode.Thanks!
November 18, 2019 at 3:16 pm #1157901Hi,
Adding theme shortcodes inside other theme shortcodes can have unexpected outcomes but it is possible to do.
In order to view the shortcode output you need to turn on debug mode
Once turned on add a page and create your gallery using the layer builder. We are only using this page to get and copy the shortcode it won’t be a live page. You’ll notice the shortcode is populated towards the bottom of the page. It will look like this…
[av_gallery ids='' style='thumbnails' preview_size='portfolio' crop_big_preview_thumbnail='yes' thumb_size='portfolio' columns='5' imagelink='5' lazyload='avia_lazyload' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='']
Copy it. Now on your actual page create an accordian and paste the gallery shortcode into it. It will look something like this…
[av_toggle_container initial='0' mode='accordion' sort='' custom_class='']
[av_toggle title='Toggle 1' tags='' custom_id='']
paste your content here
[/av_toggle]
[av_toggle title='Toggle 2' tags='' custom_id='']
paste your content here
[/av_toggle]
[/av_toggle_container]Be super careful as the debug panel can break everything if used incorrectly. Once you get to know the shortcodes you can code straight into the debug panel but that isn’t advisable.
Hope that makes sense and helps a little.
Thanks
TJ
November 19, 2019 at 5:47 am #1158026November 19, 2019 at 7:15 am #1158040I had actually already done that, but I’ve decided to go a completely route with displaying their photos. I need it to be easy for the client to do it themselves. Thank you, though! :)
November 20, 2019 at 4:20 am #1158347 -
AuthorPosts
- You must be logged in to reply to this topic.