Support » Themes and Templates » Help creating a custom slideshow

  • I am building a custom theme for a photography company, and have hit a complete block here. Mainly, I don’t know what my options are. The design calls for a slideshow of images on several of the pages. Each instance of the slideshow is designed the same, but the photos will be unique to each. The design is really simple. It’s just a large photo, dots below to represent each image in the stack, and left/right arrows.

    I can build this in javascript or something like that, but I’m not sure what my options are for integrating that. I could use a plugin, but I have two problems with plugins: 1 – They can break if the user upgrades WP, and 2 – They are hard to style to fit the design you need and the styling may not survive an upgrade of the plugin.

    I would think integrating it into WP would be a great way to go, but I don’t know where to start on that. Ideally, the user can add and change photos in the galleries through the WP admin panel, so this would be nice as well.

    I dunno, I just don’t really know where to start on this one, so if someone could point me in the right direction, that would be great!


Viewing 15 replies - 1 through 15 (of 24 total)
  • Moderator Jose Castaneda



    It sounds like you know what you have to do but don’t want to. The quick solution would of course be using a plugin and styling it. There are a few that allow for custom styling but I couldn’t tell you which ones are good. The second option would be creating your own slider from scratch or modifying a pre-existing jQuery slider to suit your site’s theme. I guess it would really depend on how complex you want your slider to be when it comes to transitions.
    I personally would use a plugin for the meantime as a quick solution all the while create my own with a jQuery slider plugin modified and styled.

    Thanks so much for the prompt reply.

    It’s not so much that I don’t want to do this (I love this stuff), but I don’t know how to best integrate it so it’s easy for the client to update it. I have zero experience with integrating that sort of thing with WordPress, but I do look forward to learning it.



    Forum Moderator

    Thanks Esmi, but as I mentioned above, I don’t really want to use plugins if I can avoid it, and that doesn’t really give the client the easy control I am looking for.

    Thanks Esmi, but as I mentioned above, I don’t really want to use plugins if I can avoid it.

    Most plugins are opensource so you could make the plugin code part of your theme, just find a lightweight plugin or JQuery and build it in!

    I am looking at Flex Slider, Woo Themes have the IP on it now, but you are allowed to use the code, I am using two sliders here, and will be releasing this free child theme, once I have ironed out any isues.





    Forum Moderator

    that doesn’t really give the client the easy control I am looking for.

    Did you even try the plugin I mentioned? It allows you (or your client) to set up & manage as many different configurations as required.

    @DigitalRaindrops: Thanks! If I go the plugin route, I will look into that.

    @esmi: No. I simply looked at it with the limited information and screenshots that was there. But again, I would like to avoid plugins in the first place. I am toying with custom building something right now. If that proves too difficult, I will look into plugins, and I will look at yours.

    You should be able to adapt this child theme to do what you want, it has a setup page and a function where you pass in a couple of arguments.

    It would be easy to modify the code to return different data sets, and wp-super-cache would limit the database reads.



    Thanks David! That looks like an awesome option. But now I am really curious how to start integrating my own JQUERY slideshow into the control panel. Any recommendations where I can start looking to learn how to do that myself?

    The best way is to look at themes that have the code you need, then study the code and try to “do it yourself”, if that fails then there are plenty of reasonable code jockey’s at places like people per hour.

    Looking at your first post, I would look at the Flex Slider and a Page of posts template, you would not need a slider admin page, if you look at this one, it uses metaboxes to display posts from a category in a page, use some of that or shortcodes to load the slider.

    This is 80% of the solution, you just need to merge the two!



    OK. Thanks. I think that gives me some direction. I really really appreciate it.

    Thanks so much for that help. I got it all working last night, and it’s working phenominally. I ended up creating a shortcode that pulls the attached images and prints them in the apropriate HTML.

    Now, the only thing I would like to do is add a button in the “Add Media” Window next to the “Insert Gallery” Button. It would simply say “Insert Slideshow”, and it would just attach the shortcode for the slideshow. Any direction on that one?

    There are a few premium themes that add an icon in the editor which can insert pre-defined shortcodes in the page, I do not have an example.

    As you are using attached images, I would use a custom post type, that is not searchable and cannot be added to the menus, use the title slug in the shortcode and retrieve the images.

    Here is the code for an Advert Custom Post Type that you can modify.

    Then use Query Post to find the post->ID by {slug}, you already have code for the attachments.

    So if the attached images were attached to a custom post with the Title London by Night and slug, london-by-night, the shortcode may look like:

    [gallery london-by-night]

    If you have a test site and don’t mind, it would be great to see it in action!



    That’s a really good idea! Unfortunately, I have taken this a completely different direction. I just us wp_get_attachment_image() to get the images that are attached to the pages, then display them on the page with the custom shortcode [start_slideshow] I styled that to be semi-pretty and accessible, then fancied it up more with jquery.

    What I would love is to have a simple button in the add media window that lets me customize and place the shortcode, but I am unsure at this point if that’s necessary now. The client and I are deciding if we will need these slideshows in blog posts, or just the pages. If they stay only on the pages, there will be no need for the client to add shortcode for it. So for now, we wait.

    Here is the test site. It’s got a long ways to go, so don’t judge too harshly :p Test-Site

    im not as experienced as some users here, but a method i have used in the past for a similar effect was to use custom posts types, with an “album” taxonomy. giving you the ability to create multiple loops each pulling a different “album”, leaving you the full freedom of css and scripting etc.

    if thats not the sort of thing you were thinking then sorry xD

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Help creating a custom slideshow’ is closed to new replies.