Support » Plugin: Slick Slider » Independent Caption
Independent Caption
-
Hi,
Is it possible to include the slide captions in a different location in my theme? I.e. am I able to use a piece of code in my template (within or outwith the loop)?
Thank you!
-
Hi @mikechalmers,
this is not possible by default.Depending on what you are trying to achieve you may want to try out the following (untested):
- Get the current post’s gallery in your template with get_post_gallery() and echo it
- Apply CSS on it to hide the images (not the captions)
- To sync both sliders use slick’s method
slickSetOption
in your (Child) theme’s/plugin’s JS like this:$( '.first .slick-slider' ).slick( 'slickSetOption', { asNavFor: '#slick-slider-1', } ) $( '.second .slick-slider' ).slick( 'slickSetOption', { asNavFor: '#slick-slider-2', } )
Get the needed
id
’s from inspecting the source code.
If you need additional help, don’t hesitate to ask.
-
This reply was modified 6 years, 7 months ago by
Philipp Bammes.
Hi @mikechalmers,
have you been able to review my response?Hey Phillipp,
Yes thank you – I’m hoping to try it soon but am having trouble making captions appear at all at the moment – can you help?
I’m also finding an issue with my slides being all different sizes and sometimes appearing to the side when another slide is active. Is the best way to solve this to have slides all same height / width (they don’t all have same aspect ratio)?
Thirdly, I would like the slider to move to next slide when the slide itself is clicked (not dragged / no arrows).
Here is the sample versions I’m working on: http://www.cb-artland.com/slider-test/
I realise I’m raising multiple things at this point, would you prefer me to open different threads?
Thanks!
Actually, I’ve just got initial captions appearing and will try to implement now – but if you could offer any advice with slide sizes and clicking the slide, that would be great!
And I’ve got a second instance of the gallery running, I’ve displayed none on the img class for this slider so slides don’t appear – but now all captions in this second gallery are visible in one long line.
Thanks
-
This reply was modified 6 years, 7 months ago by
mikechalmers.
-
This reply was modified 6 years, 7 months ago by
mikechalmers.
I have also managed to correct the below issue:
I’m also finding an issue with my slides being all different sizes and sometimes appearing to the side when another slide is active. Is the best way to solve this to have slides all same height / width (they don’t all have same aspect ratio)?
This seems to have been caused by % margins in the container div, part of the theme template.
Please ignore this part of the request.
Hi @mikechalmers,
due to the forum downtime this morning I wasn’t able to get back to you earlier.
I realise I’m raising multiple things at this point, would you prefer me to open different threads?
Yes, for future support requests, please open multiple threads.
Thirdly, I would like the slider to move to next slide when the slide itself is clicked (not dragged / no arrows).
I noticed you created a separate thread for this so we should continue there.
And I’ve got a second instance of the gallery running, I’ve displayed none on the img class for this slider so slides don’t appear – but now all captions in this second gallery are visible in one long line.
The FAQ states that captions don’t have styles by default. You need to apply CSS on them manually (in your theme’s Custom CSS part of the customizer). Also, make sure you correctly hide the images.
.slick-slide img { display: none; }
Keep me updated whether this solves your problems.
@mikechalmers, any progress on this?
I’d love to see this thread resolved!
Set to
resolved
due to @mikechalmers‘ missing response.
- The topic ‘Independent Caption’ is closed to new replies.