WordPress.org

Ready to get started?Download WordPress

Forums

Gallery Slideshow Plugin Development (3 posts)

  1. MatthewN
    Member
    Posted 1 year ago #

    Hi Everyone, I am attempting to create a reasonably simple plugin that uses the default WordPress gallery and adds a slideshow in addition to the thumbnails. I have almost managed to accomplish this, but am having difficulty displaying the slideshow as the images are set in the "Order images by:" part of the Gallery Settings. I have used the "gallery_shortcode" function in the media.php file as the base of the plugin, so far this has worked quite well, the thumbnails show up as they should. I have been using "wp_get_attachment_link" and "wp_get_attachment_image" to get the first image in the slideshow, but cannot seem to get the order right. The changing of the images I was going to do with jQuery, but haven't quite got there yet. There is a tutorial for this which I was hoping would be useful for that.

    Does anyone know if this is possible? Or if there is another more suitable alternative to accomplish this. I am not at all an expert in creating plugins, but so many of the Gallery plugins available add unnecessary administration panels, instead of just using the gallery WordPress already has. I appreciate any input, Cheers.

  2. bcworkz
    Member
    Posted 1 year ago #

    So you have a modified version of the gallery shortcode function in your plugin that replaces the default? Depending on how you modified it of course, you should still have access to the attachment array used to generate the thumbnails. If you step through this array to generate a large image link in turn, wouldn't this be in the same order as the thumbs?

    Then you just need to feed this ordered link list somehow to the client to effect the slideshow. So if I understand what you're doing correctly, yes, it should be possible.

  3. MatthewN
    Member
    Posted 1 year ago #

    Great, thanks so much for your reply. Yes, it sounds like you have understood correctly. The gallery shortcode funtion has actually been barely changed, aside from the HTML output. I will try and post the code later tonight when I get home, it is sort of a collage of techniques I have got from other plugins, combined with the gallery shortcode funtion.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.