• Resolved mikechalmers

    (@mikechalmers)


    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!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Philipp Bammes

    (@tyrannous)

    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):

    1. Get the current post’s gallery in your template with get_post_gallery() and echo it
    2. Apply CSS on it to hide the images (not the captions)
    3. 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.

    Plugin Author Philipp Bammes

    (@tyrannous)

    Hi @mikechalmers,
    have you been able to review my response?

    Thread Starter mikechalmers

    (@mikechalmers)

    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: https://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!

    Thread Starter mikechalmers

    (@mikechalmers)

    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 7 years, 10 months ago by mikechalmers.
    • This reply was modified 7 years, 10 months ago by mikechalmers.
    Thread Starter mikechalmers

    (@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.

    Plugin Author Philipp Bammes

    (@tyrannous)

    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.

    Plugin Author Philipp Bammes

    (@tyrannous)

    @mikechalmers, any progress on this?

    I’d love to see this thread resolved!

    Plugin Author Philipp Bammes

    (@tyrannous)

    Set to resolved due to @mikechalmers‘ missing response.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Independent Caption’ is closed to new replies.