WordPress.org

Ready to get started?Download WordPress

Forums

Captain Slider
[resolved] Can't display 2 images in 1 slider (15 posts)

  1. hoiyam
    Member
    Posted 1 year ago #

    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.

      http://wordpress.org/extend/plugins/captain-slider/

  2. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. hoiyam
    Member
    Posted 1 year ago #

    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

  4. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. hoiyam
    Member
    Posted 1 year ago #

    post_class(); gives slides and http://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.

  6. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

    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

  7. hoiyam
    Member
    Posted 1 year ago #

    Sorry ;) here you are http://bit.ly/TvXFqL

  8. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

    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

  9. hoiyam
    Member
    Posted 1 year ago #

    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...
  10. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

    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>

  11. hoiyam
    Member
    Posted 1 year ago #

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

    Admin: http://bit.ly/119Nbnc
    Display: http://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 :)

  12. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  13. hoiyam
    Member
    Posted 1 year ago #

    Yes, we had to downgrade it to wordpress 3.1.4...

  14. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  15. Captain Theme
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic