Are there any solutions to transform a default image gallery into a simple slideshow as seen in this theme?
Note: click to move to the next picture in the gallery.
Are there any solutions to transform a default image gallery into a simple slideshow as seen in this theme?
Note: click to move to the next picture in the gallery.
You must be logged in to post a comment.
Yes, you can use any slider jquery plugin you wish, but to feed the slideshow you need the photos.
Galleries in WordPress are composed of posts with post_type attachment, and attachments that are attached to a post have that posts ID as their post_parent. So to get the images for the slideshow or slider, you need to find posts, that are of post_type attachment, and are children of the current post.
This article has more information on attachments:
http://digwp.com/2009/08/awesome-image-attachment-recipes-for-wordpress/
If you browse to the bottom of the article there is code to grab all the attachments attached to the current post:
This can be used as a basis for generating the markup for the slideshow/slider by modifying the html in the post loop.
This question deals with using nivoslider and image attachments:
Loop through child images of a parent for a Nivo Slider