Support » Plugin: WunderSlider Gallery » [Plugin: WunderSlider Gallery] Works well, but make it easier to grab all images from post as conten

  • Resolved Unislash


    You have competitors, and they are significantly easier to use. Probably the most common use for a slideshow is just a slideshow of all of the images attached to a post. Make it dead simple to do this, and you will be much better off!

    I ended up having to make my own shortcode and then wade through your source code to figure out why your shortcode wouldn’t nest with it. For those in the same boat, line 46 of ./lib/core/class-wunderslider-shortcodes.php removes all shortcodes from the rest of the plugin, so you must re-add your shortcode there. Also, you must add
    $content = do_shortcode( $content );
    to line ~91 to re-enable nesting.

    I also found it hard to understand your installation documents that you reference to in the ‘Installation’ link of the plugin here hard to locate and then hard to understand. My main question I found myself asking was where to place what in my FTP server (as I was instructed to skip straight to the wordpress section, which doesn’t cover that well).

    Finally, because you use non-standard html as markup for the plugin, wordpress automatically kills any markup one has written when you go back to the visual editor. This isn’t necessarily your fault, as there are TONS of threads complaining about it, but I would think you could implement this using standard html elements like many other sliders have. For those trying to get around this limitation, I ended up using an unofficial plugin from which still works. I hope this plugin doesn’t introduce any security concerns, as it stops filtering from happening in the post input fields, and the author wasn’t very clear on if it overflows into public inputs or not.

    Anyway, I like what you’re doing here. Once everything is all set up and customized, it’s a pretty capable plugin. Just have to add some polish to make it worth it. Thanks for your effort!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Here’s a bit of an update. For those wanting to get this to work with the visual editor, there’s more to do. First, the plugin from doesn’t solve the html stripping problems (you don’t need to use it). If you want to solve it, you’re going to have to go deeper. Please note that you can mess things up here, as you’re editing things akin to wordpress source files. Anyway, pull up /wp-includes/kses.php and add this in the $allowedPostTags variable:

    'wunderslider' => array(
    	'mode' => true,
    	'display' => true,
    	'autoAdjust' => true,
    	'useCaption' => true,
    	'useSelectors' => true,
    	'useNav' => true,
    	'useThrobber' => true,
    	'useFlick' => true,
    	'mouseOverPause' => true,
    	'effect' => true,
    	'effects' => true,
    	'animateInterval' => true,
    	'overlay' => true,
    	'duration' => true,
    	'zIndex' => true,
    	'width' => true,
    	'height' => true,

    Then pull up /wp-includes/class-wp-editor.php and search for ‘article[*]’. Add an entry for wunderslider like so:

    'extended_valid_elements' => 'wunderslider[*],image[*],article[*],

    This will clear the wunderslider xml element from wordpress’ filters. Unfortunately, there is something trickier to tweak to allow the <image> element to be skipped, as wordpress loves to change it to <img alt=””>. Thanks wordpress!

    To get around that, I have just coded a shortcode. So far I have never needed to make a slider with anything but all my images for a post, so I just made a shortcode that grabs them and formats them correctly:

    function sc_postimages($atts, $content = null) {
    		"size" => 'large',
    		"link_to" => ''
    	), $atts));
    	$images =& get_children( 'post_type=attachment&post_mime_type=image&post_parent='.get_the_id().'&orderby=menu_order&order=ASC' );
    	$imageSources = array();
    	$output = '';
    	foreach( $images as $imageID => $imagePost ) {
    		$imagedata = wp_get_attachment_image_src($imageID, $size, false);
    		$output .= '<image url="'.$imagedata[0].'" linkUrl="'.
    			($link_to == '' ? $imagedata[0] : $link_to)
    			.'" />
    	return $output;
    add_shortcode( 'postimages', 'sc_postimages' );

    The last thing you need to do is, unfortunately, change some of wunderslider’s source code. For some reason, wunderslider’s parameters are case-sensitive, and wordpress turns them all to lowercase during the filter. This shouldn’t happen, but it’s convention to code in a way that user input, options, and parameters are not case sensitive. Allowing this would be one nice layer of polish that takes all of 5 minutes to do with find & replace. Edit /lib/core/class-wunderslider-xml-parser.php and add $attribute = strtolower($attribute); on line 345 before the switch statement, and then manually lowercase all cases in the following switch statement. Then, edit /js/wunderslider-min.js to find and replace the parameters you’re using and change them to all lower case.

    @WunderSlider it’s a good start, but you’ve got a lot ahead of you to make this plugin an option for most wordpress users. I would highly advise you to implement the case-insensitive bit, as well as use valid html elements. You can do it!

    Hmm, looks like I went at this the hard way. I was attempting to use wunderslider without the actual plugin. No wonder I was having trouble… that’s what you get when you don’t read much of the about page :-p

    I’m still having issues turning captions off even though I have set the wunderslider gallery plugin to do so. Also, when two sliders are on a page, only one automatically changes slides. 🙁

    Other than that, the plugin itself works quite well, good job!

    Plugin Author itthinx


    Hey Unislash, many thanks for your feedback and taking the time to work with the plugin.

    Yes, you could have spared yourself some time 😉 It can handle the WordPress [gallery] shortcode and now also NextGEN Gallery’s [nggallery].

    The thing about slides only changing on one slider when there are two looks like a bug, I’ll need to look into that. Odd, because it seems to happen sometimes and sometimes not.

    Again many thanks for your feedback, I’ll post an update after looking at the issue with two sliders.

    Thank you for making it 🙂

    Glad to hear you’ll take a look at the changing slides business. For my uses, I’m more concerned with the captions not able to be turned off.. is the toggle working for you through the wordpress plugin?

    Lastly, a thing on my wishlist for Wunderslider would be to allow the transitions to apply when manually changing slides. That would be a nice feature 🙂

    Plugin Author itthinx


    Phew, finally got to publish the update that fixes the issue with multiple sliders on the same page. Marking this issue as resolved, please download the latest WunderSlider plugin via

    The thing about transition effects being applied (as an option) when you change slides manually is on the @todo list 🙂

    Sweet! Great job 🙂

    Looking forward to your next updates. Hopefully you can get to captions and transition effects!


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WunderSlider Gallery] Works well, but make it easier to grab all images from post as conten’ is closed to new replies.