• Resolved hoiyam

    (@hoiyam)


    Hello,

    Love this slider, it’s great and really want to get this working on my site but this is what is happening…

    It’s *happy* when I had 1 slide in a slider, it breaks when I have 2 slides running at the same time. This happens in the Twenty Ten theme as well as the theme I edited for this website:

    I checked the html in DOM mode and compare the html with a working Captai slider on another site (I got the “Not Working html…” running on my site):

      I disabled all my other plugins but it looks the same…

      I try disabling most of the non-related .js on my site but nothing changed…

      I can’t upgrade my wordpress version because of college server issue…

      I hope you can spot something different and could help me fix this issue?

      Many thanks.

      https://www.ads-software.com/extend/plugins/captain-slider/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Captain Theme

    (@captaintheme)

    The problem I believe is that you’re trying to do make the slider quite small, like 125px x 125px. This is fine but it will always try stretch to the full width of its parent container, so wrap the shortcode or PHP in a div with style="width: 125px;" or something like that and it should display better.

    Thread Starter hoiyam

    (@hoiyam)

    OK, I’ve worked it out with my colleague. The problem is that the post_type is “slides” (set in line 9 of template.php).

    Then, in line 42:
    <li <?php post_class(); ?>>

    Fetches:
    <li class="post-272 slides type-slides status-publish hentry" style="width: 599px; float: left; display: block;">

    for instance, and it appears that the class = ‘slides’ here conflicts with the outer <ul class="slides"> from line 34.

    We removed the post_class();from line 42, and it worked fine. Though I think a fix would just be to re-name the post_type

    Could you tell me if removing post_class(); from line 42 (<li <?php post_class(); ?>>) would cause any function issue please?

    Thanks

    Plugin Author Captain Theme

    (@captaintheme)

    Nope the post_class() was contributed by another user of the plugin on Github. I may remove it in version 1.1.0 as it has caused some styling issues for me before too. Renaming the post type is definitely not an option, as what else would it be but slides? Also, doing so would render every single user’s current slides useless (and they’d have to recreate each slide) so I can never change the post type in future versions.

    How come it’s a problem that both the <li> and <ul> have a class of slides? There should be no ‘conflict’ unless you’re making incorrect styles.

    Thread Starter hoiyam

    (@hoiyam)

    post_class(); gives slides and https://bit.ly/TvXFqL

    This may looks like a styling issue but the core (at least for our site) lays in the cloning function which is executed by/to slides.

    This then leads to a style issue because .slides is applied to incorrect elements in the slider for us…

    However, we haven’t looked into the issue in Setting > width 0, height 0; width 100, height 100 yet.

    Plugin Author Captain Theme

    (@captaintheme)

    Link doesn’t work but if you need to target the ul or li you could just do ul.slides or li.slides – regarding the sizing issue, look at my first reply. That’s how you would display a slider with a max width of like 200px or something like that

    Thread Starter hoiyam

    (@hoiyam)

    Sorry ?? here you are https://bit.ly/TvXFqL

    Plugin Author Captain Theme

    (@captaintheme)

    What’s with the clone classes? This shouldn’t be happening if you were using the default theme and no other plugins activated. Something else is causing these issues

    Thread Starter hoiyam

    (@hoiyam)

    No idea what’s causing it… we also tried switching to default theme but the same issue applied…

    Before removing post_class(); in line 42, we also tried:

    • Disabling all plugins;
    • Uninstall and Reinstall Caption Slider plugin;
    • Disabling most of the non-related .js;
    • Update jquery js version (assuming our theme uses a different version of jquery) to match what is supported for Caption Slider…
    Plugin Author Captain Theme

    (@captaintheme)

    But can you confirm that if you’re using Twenty Eleven theme and have all plugins disabled besides Captain Slider, that the plugin works as expected? Whatever is causing your issue is definitely not in the plugin and the post_class part only adds a few different classes to the <li>

    Thread Starter hoiyam

    (@hoiyam)

    Yup, confirmed tested with Twenty Eleven theme and have all plugins disabled besides Captain Slide:

    Admin: https://bit.ly/119Nbnc
    Display: https://bit.ly/Vj4QZp

    The only fix for my site was to remove post_class(); in line 42…

    If you don’t think this affect the slider functionally then I’m happy to leave it as this for my site only ??

    Plugin Author Captain Theme

    (@captaintheme)

    Honestly not sure why it’s not working for you. I guess it may be your version of WordPress as you said you were stuck with an old version. What version is it?

    Thread Starter hoiyam

    (@hoiyam)

    Yes, we had to downgrade it to wordpress 3.1.4…

    Plugin Author Captain Theme

    (@captaintheme)

    Oh definitely can’t guarantee/assure compatibility with 3.1.4 – that’s a very very old version. I haven’t even tested with 3.2 haha.

    Plugin Author Captain Theme

    (@captaintheme)

    I mean just with jquery, the plugin loads jquery straight from WordPress so 3.1.4 must have a very very old version of jquery and that probably would stop the plugin working. I just can’t include fallbacks for such an old WordPress version sorry – it’s way too hard to support when you should really be on 3.4+ (i know you can’t but i’d speak to your college/hosting and tell them it’s necessary. 3.1.4 has thousands of bugs that have been solved in recent versions and huge security flaws etc.)

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Can't display 2 images in 1 slider’ is closed to new replies.