WordPress.org

Ready to get started?Download WordPress

Forums

Responsive Slider
[resolved] Slider displays at the top of containing element (28 posts)

  1. ZeroGravity
    Member
    Posted 1 year ago #

    When I add the slider to a page or post it displays at the top of the content area, not in the place where I have added the shortcode.

    Any Thoughts?

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

  2. Jandal
    Member
    Posted 1 year ago #

    I have the same issue, did you have any luck working around this?

    I'm testing and having this issue in standard twenty-ten/eleven themes.

    Thank you,
    =-)

  3. MacGreenbear
    Member
    Posted 1 year ago #

    Same here...can't seem to find out how to move it down further in the page?

  4. Lane Lester
    Member
    Posted 1 year ago #

    I suspect the solution might be found in .../responsive-slider/css/responsive-slider.css, but I only know enough CSS to be dangerous. I looked at the code, but I couldn't tell what's causing the slider to be placed above everything else in the post.

    Very disappointing, since this is the only responsive slider that's working at all for me... and I tried a flock of them.

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    the problem is that the plugin echos the shortcode result against any shortcode coding rules, instead of returning it.

    converted core function (is about in the middle of responsive-slider.php) (untested - no guarantee; make sure to have a backup copy of the original plugin):

    edit:
    corrected pastebin: http://pastebin.com/7KMAffdJ

  6. Lane Lester
    Member
    Posted 1 year ago #

    You'll have to visit http://the.mountaingallery.net/ to see the problem. The slider is still at the top of the first post (it should be at the bottom, just above the slider in the next post).

    You'll see it's displaying code instead of images.

  7. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    thanks for testing, and particular for showing the broken result ;-)

    corrected:

    edited pastebin http://pastebin.com/7KMAffdJ

  8. Lane Lester
    Member
    Posted 1 year ago #

    Getting closer! :-)

    The slider is now displaying where it should be: at the bottom of the post.

    However, only the captions are displaying, not the images.

  9. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    thanks -
    I forget to add the $post->ID to get_the_post_thumbnail()

    corrected v3:

    http://pastebin.com/7KMAffdJ

  10. Lane Lester
    Member
    Posted 1 year ago #

    Terrific! It's working now.

    There is the matter of the huge amount of blank space below the slider. It looks like about 200 px, based on the space between the next two posts. I would suspect it's something in the plugin's CSS, but I didn't see anything that seemed like it would reserve that much space.

    I have the plugin set to the exact size of the images: 510 x 255.

  11. Hal Gatewood
    Member
    Posted 1 year ago #

    In your style.css (line 30) you have a style set that is causing the issue.

    li { margin-bottom: 2%!important; }

  12. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    I am going to download and install the slider plugin; see if I can reproduce the display problem, and check the css.

    will take a while...

  13. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    @Hal Gatewood

    good catch ;-)

    not a plugin css problem after all; layout works fine in my test site.

    @llester

    if this is all, please mark the topic as 'resolved'.

  14. Lane Lester
    Member
    Posted 1 year ago #

    Wow, Hal! That did the trick, all right. I changed the child theme to include:
    li { margin-bottom: 0!important; }

    I'm really out of my league on this responsive stuff. I would never have thought a list item definition (li) would have that effect.

    BTW, I just noticed the slider is displaying all eight slides, both the four for ID=1 and the four for ID=2 when I have in that post just this shortcode:

    [responsive_slider id=2]

    I notice the first command in that function is lacking a couple of assignments:
    'meta_key' => '_slider_id', 'meta_value' => $id
    but adding them in didn't solve the problem. There must be something else that's cause the function to ignore the slide ID.

  15. Lane Lester
    Member
    Posted 1 year ago #

    @alchymyth

    What Hal caught was the cause of the excess space below the slider. That's what the CSS change fixes, not the subject of this thread, which is a plugin problem... and which your changed code fixes.

    I'm not the OP, so I can't mark it as resolved.

  16. Hal Gatewood
    Member
    Posted 1 year ago #

    Does it look like this?

    `function responsive_slider($id) {

  17. Lane Lester
    Member
    Posted 1 year ago #

    OK, Hal, I found it. The parameter passed to the function was missing:
    function responsive_slider($id = 0) {

    I think the plugin is working perfectly now.

  18. ZeroGravity
    Member
    Posted 1 year ago #

    If it's all said and done now let me know and I will mark it resolved.

  19. Lane Lester
    Member
    Posted 1 year ago #

    Hal, I didn't see your last until I posted mine.

    I obviously don't understand PHP in this case, because I would think the $id = 0 would supply 0 as the value of $id to $meta_value. Evidently it doesn't, because the plugin is working and displaying the two sliders with just four slides each.

  20. Hal Gatewood
    Member
    Posted 1 year ago #

    Yes, what you wrote is what it should be. $id = 0 means 0 is the default if nothing get's passed.

  21. Lane Lester
    Member
    Posted 1 year ago #

    Yes, Darren, I think it's all good. I'll post my latest version of the file at http://www.drlanelester.com/responsive-slider.txt

  22. ZeroGravity
    Member
    Posted 1 year ago #

    Great! Thanks for the plugin.

  23. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    maybe the plugin's developer can include those edits into the next upgrade of the plugin ?

    (which actually was just updated yesterday).

  24. Jandal
    Member
    Posted 1 year ago #

    Thank you for taking the time to resolve this issue!

    Looking forward to it being added to the repository.

    Have a great day!
    =-)

  25. melriks
    Member
    Posted 1 year ago #

    Some download sources of this plug-in still have the original code to them where the slider doesn't stay in the source position. Apply the code above to fix.

  26. ibstars
    Member
    Posted 1 year ago #

    Thanks very much alchymyth for the fix!

  27. Griden
    Member
    Plugin Author

    Posted 1 year ago #

    Hi all,

    Thanks for the input and sorry for the delay - it's been a while since I checked the plugin forums. The slider is now updated.

  28. Lane Lester
    Member
    Posted 1 year ago #

    I ended up using Cyclone Slider2 on the site I was building. But I just tested the new version of RS on a test site, and it's working fine. Thanks for the update; I'm glad to have this as an option for future sites.

    It would be a kindness if developers would include the shortcode and PHP snippet where it could be easily found. A good spot would be the Slides / Settings page.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags