How do I create a custom wordpress slideshow plugin? I’ve been looking for the tutorials on google but I couldn’t find one, would you guys mind giving a tutorial here or link to some other custom slideshow plugin tutorials?
Leave a Reply
You must be logged in to post a comment.
So… this is my slide show implementation:
This is the code i use to create a slideshow based on the flexslider JQuery plugin (Thank you David!). It also gives the user a checkbox so he can chose what pictures to include in the slideshow, and what pictures to skip. The images are taken form the post attachments, if you want a general slideshow unrelated to any post you need to implement the solution David gave 🙂
This is the function/filter i use to add a checkbox inside the media uploader to let the client choose if he wants to include a picture in the slideshow or not.
then i use this function also in my function file (both of these can be included in a plugin if you wish so):
Then you need to include the jquery:
This is inside the custom jquery adjust the slidehow:
And the css related to the slideshow:
And Finaly! The slideshow code ready to insert into your theme front end. 🙂
The only required parameter is the post id. The second parameter is set to large by default, but you can choose what image size to return. The last parameter sets the thumbnail image size, if this is left empty no thumbnails will be returned.
Hope this isn’t overkill. 🙂
Because your question is a little too far fetched here is an easy implementation of WP_Query, a simple to install Javascript Slider, and Post Thumbnails.
Add this snippet of code to your page you’d like your Slider
Add these to your functions.php:
As Well as:
You’ll want to make sure to download and extract Flexslider or any other slider script you prefer.
Once you have extracted Flexslider you’ll put this piece into your Header/Page with Slider/Yepnope:
Once you’re ready to output your Slider paste this code wherever you’d like your Slider to be Output:
Good luck, I hope this gets you on a good enough path 🙂
Here’s the snippet for Adding a Custom Post Type that the function can loop through
You’d also need to change your $the_query to: