
Cleaner Gallery gives you complete control over your WordPress galleries. It provides a valid XHTML solution and supports many different Lightbox-type image scripts.
- Version: 0.7
- Requires: WordPress 2.6+
- Support: Support forums
- Download (WP.org plugin repository)
Why I made this plugin
So you upgraded your WordPress blog to the nifty new 2.5 only to use the gallery feature that Matt Mullenweg has been raving about.
Now, you upload that first set of pictures to only find that there are a lot of problems:
- The gallery shortcode outputs invalid XHTML.
- It injects style rules in the middle of the page.
Even when you specify to use the thumbnail, it only resizes your image, which causes some problems with page load times.(Fixed in WP 2.5.1)- You’re happy that you have the new feature but are still a bit unsatisfied.
What does this plugin do?
- Creates valid XHTML, which I know you all care about.
- Uses the image that you specify. It doesn’t just resize your very large images.
- Let’s you control the display of your images through CSS.
- Adds support for multiple Lightbox-type scripts.
Support for Lightbox-type scripts
- FancyBox
- FancyZoom
- Floatbox
- GreyBox
- jQuery Lightbox
- jQuery Lightbox Plugin
- jQuery Lightbox Plugin (Balupton Edition)
- Lightbox 2
- Lightview
- LightWindow
- Lytebox
- Shadowbox
- Slimbox
- Slimbox 2
- Shutter Reloaded
- Thickbox
The plugin in action
Since I knew this thing would be very different across multiple themes, I decided to test it out on a few. Actually, I only have a few themes that aren’t mine, so I decided to use a few of those. You’ll see examples from:
- A very popular K2.
- My favorite Small Potato theme, Peaceful Rush.
- One of my more recent favorites from Ian Stewart, Theseus.
- And, a theme I designed for my sister called Colorful Notes.
(Click images for a larger view. Click on the captions to go to the attachment page. The examples are from the alpha version but work nonetheless.)
I think the biggest problem one could run into here is if they’re using a lot of padding or margin on their images. You might have to go into your CSS file and change that if needed.
How to use the plugin
All of the instructions you’ll need for using the plugin are located in the readme.html file of the plugin download. It will guide you through any questions you may have.
If you’re using a version prior to version 0.5, see page 2 of this post for instructions.
Please don’t use my contact page or the comments section below to ask support questions. Use my support forums at Theme Hybrid, which is where I handle all support questions for my WordPress projects.
Pages: 1 2




Very cool idea, not only cleaning up the gallery, but also preparing the links for Lightbox & friends. Smart thinking.
And surprising that given the concern for standards the gallery code isn’t XHTML strict. Weird.
plus, glad you like Theseus (and thankful it didn’t break in your test)! And Peaceful Rush is still one of the nicer WordPress themes.
Ian
I first noticed the invalid XHTML with RC1 but figured the WP team would fix it before the release. Luckily, they gave us this nifty function, remove_shortcode(), which allows us to overwrite any shortcode already available.
Once I fixed the shortcode to my liking, I figured I might as well add in some extra functionality for fun.
By the way, Theseus is the theme I like to test things on. It’s nice to get rid of the sidebars once in a while when testing new ideas. Another little fact: Peaceful Rush is the theme that got me into this whole WordPress theme-designing thing.
For those following along at home, the XHTML for the gallery should be completely valid for the next release. It just slipped through our testing the first time around.
Matt
Thanks for stopping by and clearing that up. I was tempted to step in on trac and start putting in some fixes because I’ve been following the progress of 2.5 for quite some time. I’m just not sure if I’m ready for the big league yet.
Hi Justin,
Thanx for your release, I downloaded it and tested it in my localhost, and everything looks great. I’m going to upload it on to my blog soon.
I’m using “Options” theme in my local test server and it’s compatible, man. I’m very happy with this…
Thank you anyway
J Mehmett
Thanks for testing it out. Basically, that’s what it’s going to take to make sure it’s functioning with most themes — lots of people using it and reporting any problems they find. Let me know how well it works on your blog.
I’m not gonna use the gallery feature yet, but I was taken slightly aback by the fact that the shortcode outputs invalid XHTML. It’ll probably be fixed in WordPress 2.5.1 or something, but then again, as you said your plugin does have some other nifty features
Quick question..say the gallery feature ends up with valid code soon and for simplicity’s sake I want to go back to using it when that happens… Will disabling the plugin later make it necessary to re-create existing galleries, or will they work with the standard gallery feature post-plugin?
Thanks for the hard work and valid code.
BoltClock
Matt said above, “The XHTML for the gallery should be completely valid for the next release.” I’m not sure if that’s 2.5.1 or 2.6. It seems like something small enough for 2.5.1, so I’m not sure.
I’ll definitely continue the development of the plugin because the Lightbox features are useful to me. I want to run a photostream for my family and thought it’d be a good idea to use Lightbox.
Brandi
There’s nothing you’d ever have to change. The plugin just uses almost the same gallery shortcode included with WordPress. I just modified a few things until the WP team gets around to fixing it.
Great solution, and nice to hear from Matt that the invalid code was just an oversight.
By the time I’ve recovered from upgrading 13 other websites plus my own and hunting down/testing out replacement plugins for plugins that bit the dust upon the release of 2.5 maybe 2.6 will be out.
it would be cool if you could place say a banner on your post and that said banner will be shown on each photo page but not the same banner every time a gallery is posted
Yeah. The new WP really is not helping much. It creates more problem than making things easier as what I have experienced…geez. I’ll try this one soon.
Thanks this is great, exactly what I was looking for!
When i was reading your article, it was really awesome because it feeds my knowledge and it was so entertaining, by the way. hope you can make more article just like this. it helps me a lot. thanks and good luck.
Excellent work Justin, as always.
I modified one thing: in order to limit each gallery to show only the specific pics uploaded for that post I changed the $a_rel to ‘lightbox[gallery-' . $post->ID . ']‘. Otherwise Slimbox shows all uploaded gallery pics in every post that uses the gallery.
WordPress Modder
Yeah. I’m glad to hear it too. I’m looking forward to them taking care of the XHTML, so I can just handle the Lightbox features.
mccormicky
That’s usually how it goes.
I can barely run one site. I don’t see how you have the time to work with 13.
Dade
I’m not sure I understand.
Kay
I don’t know. I think WP 2.5 solved quite a few more problems than we give it credit for. Multiple file uploading is great. There’ll always be bugs with new software. That’s why open source is so great — we’ve got 100s of people developing the main source code and 1000s complaining.
justin
Thanks. I hope it works well for you.
olovito
Thanks for sharing. It’s something I’ve already got planned for implementation. I should update it by the end of the weekend.
awesome plugin man, thanks alot. this is a lifesaver!
Great plugin, thanks so much!
This plugin rocks!!! I was looking for something like this for the gallery. Tried it out on my localhost and would be uploading it soon to my blog. Thanks Justin.
I honestly did not know Wordpress had a gallery. Where’s the gallery? Also, is it possible to make this plugin turn all pictures in post to lightbox by default with captions.
Hi,
I took your plugin as a base for mine. I added greybox, thickbox (the one standard in wp) and highslide support. And I use the exif info that wp 2.5 now stores in the metadata to ad to the boxes. Als I extract gps info and you can view the location of the pictures taken in a box to.
You can see it live here: http://kruyt.org
Dennis, how did you manage the integration with Highslide. Someone else commented about the challenge on this and I am very interested in finding a solution.
Thanks!
To everyone
I just updated the plugin to version 0.2.2. It supports a few more Lightbox-type pieces of JavaScript too. I’ve also fixed a few bugs. The post has been updated to reflect the changes.
theWizard
Thanks. I just had to use the new gallery feature but wouldn’t with the invalid XHTML. So, it was time for a plugin.
Brad Mahaffey
You’re welcome. Let me know how it works.
Hetal Bhagat
No problem. Thanks for using it.
Doug
WordPress 2.5 has a new gallery feature. Just read about it at that link. This plugin only uses the gallery for WordPress. It just overwrites the original code. It’s not primarily a Lightbox plugin.
Dennis
The plugin already supported Thickbox. Thanks for pointing out GreyBox. I just tested it and added support for it.
I would add HighSlide, but it uses invalid XHTML from what I can see. That kind of goes against the purpose of the plugin.
Hi Justin,
What I mean with thickbox, is I auto load it in the plugin. no need to embed in my theme. And thickbox is already by default in WP2.5
code for using the tb in wp:
And here some code I use to put the exif info that wp 2.5 now reads from files in the title, so the ‘boxes’ can use it to. To display exif.
Thanks so much for the plugin. I was so anxious about the Gallery feature in WP 2.5 however I was shocked when I saw the inline css in the page and it was breaking. I wondered what had happened because ever since I started developing using css, i hadn’t come across css code in the middle of a page.
Anyway, it was great to hear from Matt that it was just an oversight but it will be out very soon with the next release. That will be so fantastic.
Otherwise, I really like the gallery feature and most of the other features in WP 2.5.
Great work – the first plugin I’ve found which deals with the wp2.5 gallery the way I wanted to (by turfing it out entirely, and doing it better!) Seriously, excellent work!
The only addition I made to this was adding the lines;
That way it looks for the caption in first the caption, then the description field, and if it can’t find it in either, it uses the title. Not appropriate for everyone I’m sure, but for my usage I always want a caption and Picasa captions come out in description, not caption annoyingly enough.
Dennis
Yeah, I know WP 2.5 has Thickbox pre-included. I went ahead and added the option into the plugin.
I’ll look more into the image metadata thing.
Matrich
They’ve fixed a few issues with 2.5.1, but the style is still right in the middle of the page. I’m not sure why they haven’t found a solution to put this stuff in the header.
Andrew
Thanks for the feedback. I’ve added an option to always turn captions on, even if you don’t define them.
Hi Justin. Thanks for creating this awesome plugin. Keep up the good work.
BTW, here’s the lightview user defined variables that I used.
Hi Justin,
Yeah, I downloaded WP 2.5.1 to see if it was sorted out about the inline css but unfortunately, it is still there so I am using your wonderful plugin however I am sure it will be sorted out.
But atleast we are sure it will be sorted out sooner than later.
I’ve got the plugin installed and activated, but the gallery isn’t showing up. I’m using the “Insert gallery into post” and it outputs the [gallery] tag. Am I doing something wrong?
It seems that this plugin uses “dl” lists (definition lists) with “dt” elements (“definition term”), just like the default WP gallery code.
I’ve read lots of criticism of the galler code, but as yet I haven’t seen anyone question the element choice. In what way is a gallery of images a definition list? In what way is an image in such a galler a definition term? And where are the definitions (the “dd” elements)?
If were going for valid XHTML, shouldn’t we try to use elements according to their definitions too? Validators don’t catch such errros, but they are just as important as validation errors, perhaps even more important.
“dl” lists are often (mis)used to get the typical layout that such lists usually get in browsers, but as far as I can tell, that’s not the reason for the choice of “dl” here. The CSS seems to override the typical “dl” presentation completely. So I’m really baffled? Why “dl”?? I must be missing something…
Perze Ababa
Thanks. I’ve updated it to include that code.
Matrich
Unfortunately, they still put it in. Adding something like a gallery is a tough call when it comes to CSS because if they put it in the header (where it should be), then they run the risk of other code messing it up. It’ll be interesting to see where they take it. At least they cleaned up the alt text problem.
Shane
I’ve responded to you on the forums. I’ll try to get it sorted out. It may be an incompatibility with WP 2.5.
Bertilo
If you don’t like the element choice, you can always change it with your gallery shortcode. Read Using the gallery shortcode. It’s explained there.
From what I can tell, this works perfectly fine:
Granted, we should probably use different elements, but what should those elements be? I don’t see any clearly logical elements for displaying galleries.
Maybe the use of a definition list is perfect for this situation. The gallery (dl) has images (dt) and captions (dd). A list with terms and descriptions. Of course, this is using the word “term” a little looser than usual, but do terms have to be text? If we answer yes, then the markup is most definitely wrong. If we say no, then maybe it’s a good solution.
I’m all for standards and good clean code, but I also don’t see a whole lot of other options to mark this thing properly. I guess we could always go with divs and spans.
This is an awesome plugin. Thank you very much.
Sorry to hijack this thread but…:
@Dennis – I just checked your blog. I really like what you did with your lightbox images. I see the code you posted for the EXIF information. Which files do you insert that into? Thanks!
Justin:
Yes, but 99.99% of all users won’t. And then we’ll have heaps of “dl” elements that are not definition lists at all. There goes our semantic web… The default choice should be a good one.
If there is no element in XHTML with a meaning that fits, then we should use “div” and “span”. That’s what they are there for. XHTML is not a particularily rich markup language. But it doesn’t get any better if we misuse the XHTML elements that do have a clear meaning.
I think a “dt” needs to be a term. That might be a symbol, and an image could be a symbol. In any case the corresponding “dd” element should be a definition of that term/symbol. A caption could perhaps be a definition of its image, sometimes, but not very often. I doubt very much that many actual galleries are of that kind. And a gallery without captions? Could that in any conceivable way be seen as a definition list? A definition list without definitions? I really don’t think that makes any sense.
In my opinion the default should be changed to “div” instead of “dl”.
hi there, good job, I started to use this plugin and it gives a lot, and of course it’s better that the standard gallery, also – because it creates valid code – I don’t know how other people but in my mind that always stands for quality.
best regards from scotland
a.d.
At the moment everything looks great, I keep testing on diverse browsers.
Charles
Thanks. I’m glad you’re enjoying it.
Bertilo
“Semantic Web.” That would be great.
And 99.99% of users will never use semantic code in other places anyway (this is definitely not a good argument for using
dlthough). The “default choice should be a good one,” but I think that maybe, just maybe, the WP team thought this was a good choice. I could be entirely wrong though, and it would make no sense to otherwise use a definition list.I think you bring up some great discussion points in your reply. Maybe the term “definition list” needs a clearer definition. According to the XHTML List Module, “Definition lists, created using the dl element, generally consist of a series of term/definition pairs (although definition lists may have other applications).” Of course, there’s plenty more to read and decipher. It goes on to give its first example, not of a traditional term with a definition, but how to advertise a product with product descriptions.
Now, the one thing I do disagree with your statement is “the corresponding ‘dd’ element should be a definition.” The word “definition” isn’t always accurate, even when talking about a definition list. W3 (article above) calls this both a definition and a “description.” Now, an image caption may not always be a definition, but it should always be a description. Otherwise, it’s not a caption at all. Of course, I’m being a bit picky with words.
I’d really like to expand on this discussion at some point with a larger blog post. It’d be interesting to see what others’ thoughts are on this.
tartan
Thanks. I hope it works well for you.
Diseno Web
Please do keep testing it in a variety of environments and report any problems you find. I’ll be sure to update it.
@Denis
Curious about your meta code…did you add that to the plugin? I see the end result on your website, and would like to do something similar. Any suggestions?
this plug in rock, thank you VERY much, it helps me a lot
thanx again
Justin Tadlock wrote:
Maybe not too picky. That could be a way to justify the use of “dl” in the gallery code. But I’m a bit afraid that we’re getting close to redefining “dl”, “dt” and “dd” as “list (dl) of items (dt) with related text(s) (dd)”. That seems a bit too “unsemantic” too me, but I could be wrong.
Would it then be OK to use “dl” with a single element as a general way of marking up images with captions? It’s not illogical for a list to have just one element, I guess… Actually I’ve long felt that XHTML lacks a good way to add a caption to an image. Could “dl”, “dd” and “dt” be it?
But then again: If there are no captions (i.e. no descriptions), just a bunch of images (I think that will very often be the case), then it’s hard to justify the use of “dl”. But the gallery code uses “dl” for such galleries too…
im choosing the thickbox option.
however, it seem to break the site
before applying the plugin
http://img113.imageshack.us/img113/2561/15920743ac6.png
after applying the plugin
http://img113.imageshack.us/img113/5743/49590464ct0.png
could you please help me check it out?
ho great!
thx a lot justin, that’s really the best photo plugin for WP!
your plugin cleaned up my gallery just installing it, and I got exactly what I want: a valid xhtml gallery with lightbox!
nice plugin mate, works very well.
Hi Justin,
Nice plugin you made, I have a trivial question about the wp_postmeta table :
I want to upgrade my previous thumbnails format to the 2.5.1 format but when I replace “thumb” by “thumbnail” and the file extension .tumbnail.jpg by the -150×150.jpg but it didn’t work, maybe you have an idea
Thanks a lot
henri
Thank you. The gallery wordpress comes with is quite unsatisfactory if you just want to customize it a bit. I am just afraid that further updates of Wordpress will allow customization sooner or later. Because the way it is now, just doesn’t live up to most expectations!
Grant
I do believe he did add it to the plugin. I’m not exactly sure where. If you stop by the forums, maybe we can whip up something similar.
steffy
You’re welcome.
Bertilo
It’s been a few days, but I’m not backing down from our conversation.
Honestly, I’ve got nothing too much new to add. How about using and unordered list (if we even use a list at all)?
Kei
I can’t really do anything about Thickbox breaking your site because I didn’t write the code for it. The plugin only supports the use of Thickbox.
erwan
Cool. My problem is that the WP team knew about the problem with 2.5 and only fixed a small part of it with 2.5.1. It seems that Ma.tt has fixed this on his own blog, or it has been fixed in 2.6.
mxxx
Thanks. Let me know if you run into any problems.
henri
I’m not really sure. It’s not something I’ve tried. Stop by the support forums and let me know in detail what and how you changed it, and I’ll see if I can recreate the problem and if there’s a fix.
philsblogging
I think WordPress 2.6 will fix a bunch of the problems we have now, but that’s still a few months away. I was a bit disappointed after I first used it, so I figured, why not write a plugin?
Have you considered adding a “rows” property? I see this as another shortcoming of the Wordpress code. Here’s what I added to make it work (Starting at around line 120):
Why would I need a “rows” property? What purpose would it serve? Please explain your code and what it’s for.
Regarding the metadata code provided by Dennis, I successfully added the snippet to the source of the plugin.
I have it starting on line 128, directly following the line resembling
if($title == '') $title = $attachment->post_title;. If you copy the code Dennis provided, you will need to clean it up a bit, due to WP creating curly quotes and the like.You can see the end result in this post on my site. It’s used in the bunch of images at the bottom. Just click the images to view the thickbox, the meta information is shown there.
Yeah, good job with the mod. I left a comment over at your site.
I’m not sure why WP has to create those darned curly quotes. It’s never happened on my site until I upgraded to 2.5. Maybe I had a bug before, and now it’s actually working like it’s supposed to.
Here is my modification to display the attachments’ (in most cases images) description!
Add this above the line if($a_rel == true) $link = $a_img;
and change this line too from
$output .= "\t";to…$output .= "\t";You can view this on my blog’s Tech Specs page: http://philsblogging.com/tech-specs/
dammit my html broken
here it is again:
change this ….
to that …
remove the space between the < a so it triggers a html rendering!
ok never mind!
Yeah, you really have to put code in between pre and code elements like this with WordPress:
That’s why it’s better to post these type of things in the forums.
The “rows” property can be useful if you’re giving a preview of the gallery – maybe you give the user 6 images (2 rows of three columns) and a link to the full gallery, which may have 100 images – something that would take up too much space on the page where you’re previewing it.
Of course, it’s not a useful property for the full gallery, since the code cuts the gallery short.
OK, I see what you mean now. I suppose that would be useful for the home page and archive-type pages. I might just have to see about implementing it. If it doesn’t directly mess up anything with the plugin uninstalled, then it would be a nice feature.
You might want to just add something like:
Grant, here is mine version, with the added geo and exif support:
http://kruyt.org/projects/wp-plugins/better-gallery but I need to clean it up, when I have some more time.
Great work!
Keep up the good work! 10q
It’d be nice if the number of attachments was less than 3 it would set the number of columns to that value automatically.
Hello Justin,
thanks for the gallery plugin. I installed in my test site in the dir wordpress and it works fine. But I have a small doubbt. When I see the gallery post block in the main page, the first picture appears. and if i click the post it takes to the post page. Now if press a single image it goes to the full image rather than the intermdiate size where the original gallery plugin allowed users to post their comment. that provison is absent. is this intentional designed that way.
but if click the gallery widget, it takes to the post and from their one is able to click the individual image and make comment.
i just thought i should check up whether this is intended to be this way.
thanks.
small correction. from the gallery widget it takes to the image we clicked. home page gallery stream also works that way. it is only the post block that does not give option to post comments under individual pics. thanks.
another issue that i came up is when i click a picture from the gallery stream or from the gallery widget it hows the picture. when it depicts it cuts the right portion which exceeds the standard width rather than resize it. could it be made to resize rather than crop the image in the right side. thanks.
jocuri
Thanks. I hope it’s working well for you.
bile
That’s a good point, but it’s not much of a gallery if there’s less than three images. I think it would only serve to bloat the code a bit more for something that users could set manually anyway.
vas
I’m not sure what exactly you’re talking about. This plugin has nothing to do with a widget or anything. The functionality hasn’t changed since the original.
If you’re having trouble with anything, stop by the support forums, and we’ll try to help you out.
Here are the lines to support lyteshow. Lyteshow is the Lytebox Slideshow option
// Lyteshow (Lytebox slideshow)?
$a_rel = “lyteshow[cleaner-gallery-$post->ID]“;
$a_class = “lyteshow”;
Looking good! I was wondering if you are planning to have support for additional scripts? I am quite interested in seeing Highslide and Lightwindow (which are light-whatever scripts) support.
Regards,
P.
jandry
Thanks. I’ll look into it and add it as a standard to the next update.
Pedro
Pedro. I’ll also look into these. If they’re based on
relorclass, then it won’t be a problem adding support for these.Hello
Great Solution. Exactly what i needed! But i have one problem. I am not that professional dealing with css. If you look at my example () for integration a gallery into a wordpress 2.5 post you can see a big gap between the gallery and the post title. Can anybody help me?
best regards markus
Hi, I had a terrible time getting the code to work.
Nothing I did seemed to take any effect.
In your code, you have
Obviously this is a hack, but it works. I am using Wordpress 2.5.1 running on php 5.2 or so.
thank you in any case, hope this information is useful.
The idea of this plug-in is fantastic. But I have one caveat though…
Whilst testing it, I had a user on the phone which expressed how my website became slow all of a sudden. I did noticed the site was quite slow, particularly on pages where gravatars where being displayed. As soon as I turned the plug-in off there was a great performance improvement.
I think this is down for the following reasons:
1. My first test was with thickbox
2. This is a presumption: I assume that since Justin had to replace the buil-tin gallery shortcode with his own *fixed* copy, this would slow things up considerably.
3. I might need some optimisation in my site (cache, ‘compressed’ code and so on.
I was wondering if since WP 2.6 authors claimed that the gallery xhtml issues would be fixed in this version, if the new versions of this plug-in would have a smaller footprint (as I reckon it would have less code to fix).
Cheers,
P.
Markus
You have no post at that link. Please stop by the forums if you’re having trouble.
Alex
I deleted your code because it was breaking the page. The plugin works out of the box with WordPress 2.5.1, assuming you’ve downloaded the correct version. If you have trouble, stop by the forums.
Pedro
The plugin itself adds no additional load to your blog. Replacing the shortcode does not slow things at all.
Now, if you choose to use a JavaScript solution (Lightbox-type script), which you have to add yourself, then JavaScript will slow your load times. It has nothing to do with the plugin’s main purpose: fix the invalid XHTML.
WordPress 2.6 does not fix the issues of invalid XHTML (style rules added to the middle of the page). From what I can see, it’s pretty much the same as WP 2.5.1 with the exception of a PHP code change here or there.
If you need quicker load times, I suggest optimizing your images and/or JavaScript. I have an entire thread on this stickied in my forums.
hi
thanks for your plugin. i made a small enhancemant that would be nice if you include it into the next version. it adds the image description you set in wordpress to the lightbox image. it’s really simple, i just modified the following code on line 140:
i only tested it with lightview but i suppose the syntax is the same for any other lightbox.
hmm strange,
the blog just stripped away some code. i will try to explain the changing. first read the desciption:
// the image description for the lightbox
$description = $attachment->post_content;
then add the description to the lightbox. in lightview you can seperate title and description by adding a “::” to the title attribute of the link tag.
$title::$description
i hope this is readable in the blog.
Hi!
I find your plugin to be very useful. Still, I have a question. How can I make the vertical images appear first (eventually 4 columns on a row) and the horizontal images last (3 columns on a row), like on this post http://blog.icy.ro/2008/07/bike-trip-2-reloaded/ (I have manually inserted the images).
I am looking forward for your answer.
Best regards,
George
is there a way to exclude 1 or few images from the gallery?
one other thing, would it be possible to have the gallery view as in flashviewer. For example [simpleviewer] mode? That would be also great!
Thanks for this plugin, its making my images look pretty.
Im liking the features in Wordpress 2.6 but am very surprised they haven’t done anything about the gallery feature code…there must be a more graceful way of doing this?!
Thank you thank you thank you. I have no idea why there isn’t an option in WP to link your gallery thumbs to the actual images (rather than to the interim page). Your plugin was exactly what I was looking for! The big bonus is that you set it up to work with LightView. AWESOME GOODNESS.
I installed your plugin and it works nicely. But, I tried to uncomment the lines to auto-load Thickbox and I receive a parse error. Not sure why. Here’s the exact error I receive: Parse error: syntax error, unexpected T_STRING in /home/wargamin/public_html/wp-content/plugins/cleaner-gallery/cleaner-gallery.php on line 33
I uncommented this code:
// Auto load Thickbox (included with WP 2.5)?// wp_enqueue_script('thickbox');
// add_action('wp_head', 'thickbox_css');
So it now looks like:
Auto load Thickbox (included with WP 2.5)?wp_enqueue_script('thickbox');
add_action('wp_head', 'thickbox_css');
Any ideas? I can't use Lightbox because it doesn't work with my theme (a gigantic black area covers the top 1/4 of the page when I install and enable Lightbox to be auto-enabled) so I figure auto-loading Thickbox, which comes included with WP 2.5+, should work on my WP 2.6+ blog.
You wouldn’t actually uncomment comments. Don’t uncomment this line:
I just noticed something missing from the shortcode function – the “order” attribute. I spent several minutes trying to figure out why my photos wouldn’t order properly. It even affects things when using the orderby attribute too.
BTW – thanks for a neat plugin. Have sent various people your way when ask about it!
OK. I quit being lazy for a little while and updated the plugin.
We’re currently at version 0.4, which should fix the order and orderby issues for WP 2.6 users. I also added support for Shadowbox.
Yeah, I haven’t updated the plugin to reflect the issue. Someone left a fix for it in the support forums.
I’ll try to get an update out sometime this week for others.
fixed it… css styling probs
.gallery-64{width:580px;}
dl.col-3 {float:left; width:100px;}
Thanks for the gallery plugin, how to install that?
Thank you! This is perfect. You rock!
hello,
I would love to try this plugin with wpmu not simple wordpress but noticed your code has a hardcoded path:
/wp-content/plugins/cleaner-gallery/
could that be changed possibly so it uses the current path of the file?
ovidiu
I’m sure you could change it. I’ve never worked with MU before, so I wouldn’t know exactly how it should work. I’ll look into it whenever I have a little free time.
I obtain many errors of this kind if I use this plugin:
-> character “[” is not allowed in the value of attribute “rel”
-> document type does not allow element “div” here; missing one of “button”, “map”, “object”, “ins”, “del”, “noscript” start-tag.
:s
Man! Great! Works fine with Lightview! Thanks a lot!
dayer
What DOCTYPE are you using? Also, stop by my support forums if you have questions.
Leo
Great. I’m glad it’s working for you.
Hey Justin,
Great plugin! Just one question… I was wondering how I could add the ability to save the image using a “Save Image” link under or next to the description…
If you have any idea or know where I can find this out it would be a great help!
Thanks once again!
nice plugin!
Question:
how can i add this plugin to my .php file?
i have a website which have 5 .html pages, one of the page is photo gallery. when i click the link small thumbnails are displayed. when i click any one thumbnail, my lightbox opens and shows picture coming from clearner wordpress plugin.
i m struggling hard to do this, anyone there to help me… just provide me the exact script or file, i will upload it and use it
thank you
murtaza
Thank you very much for this! I’ve been hacking the hell out of media.php since the get go, I couldn’t find the plugs to make my own plugin, but this gave me the right direction:). I’m customizing it to use Fancy Zoom, though I’m starting to lean to the cleaner jquery version Fancy Box, and turning the (X)HTML into a much simpler, cleaner version I use:
http://bradyjfrey.com/blog/san-francisco/its-tops-best-diner-in-san-francisco/
I’ve never understood why everything is such a hefty class/ID element, when you can just ID the containing tag (whether that’s a dl like in my case or your standard list), and then drill down your css from there, #mygallery dt, #mygallery li, etc. Regardless, this will let me get out of the excessive code hell. If you’d like the code when I’m done, I’m happy to send it your way:)
Brady
WordPress adds those IDs and classes because the items can be any sort of XHTML element. For more general use, you can’t just target everything by the containing element because there’s no way of knowing what the inside elements would be. Therefore, the classes are needed.
I added support for excluding specific images from the gallery, like so:
[gallery exclude="1,2,3,4"]Fetch my updated version here. (changes made @ lines 125-129)
Note: there’s no way (that I know) to actually get the attachment id in the WP admin. It is quite straightforward (but cumbersome) though: they’re numbered from the post ID and up. If post ID = 160, the first attachment (bottom-most on the upload page by default) will be 161 and so on.
hello, I was just curios about another pretty similar plugin: http://www.jarinteractive.com/weblog/2008/07/photojar/ do these 2 plugins do exactly the same? and if not could they be compatible?
thanks
ulfben
I’ll check that out. An exclude parameter would be a great addition to the plugin.
ovidiu
This plugin was created to clean up the invalid XHTML left by the WordPress gallery shortcode. I’m not sure what the other plugin does. You’ll just have to play around with both to see if they’re compatible.
thx. the other one states:
So it seems very similar except for cleaning up the code
And it has a nice gui, just for your info… maybe you can incorporate some of those features as well, just a little inspiration.
Oh and thanks for the nice plugin
Dynamically resizes images – WP functionality.
Custom image sizes – WP has thumbnail, medium, large, and full, sizes in which you can set in your image settings.
Image shortcode – Not needed because WP has the gallery shortcode.
Change default number of columns – Also a WP gallery functionality.
All of these things listed are not unique to the plugin itself. Those are simply things the WordPress gallery shortcode already does.
I just found a reliable way to get the ID of an attachment (for use in the exclude-list): press the ‘Delete’-button of the attachment and then hover over the “Continue”-link – your browser status bar will display an URL with the ID in.
I haven’t had a chance to play around with excluding images, but it’ll definitely go into the next major release version.
i want to add slimbox to chapter 16 image gallery plz help me out……………………
If you need help with the plugin, stop by my support forums.
I find myself never using the ‘image.php’ to view gallery images – relying instead on lightbox display and never leaving the post to view an image.
If you’re like me you might want to display the image description (instead of the title) in the lightbox-window.Note that it will fall back to using titles if no description is available.
A picture says more than a thousand words.
Right, no img-tag in comments. Here’s links to screenshots displaying what I’m on about.
The point is that I never send visitors to ‘image.php’, so I want all information available from the post view of the gallery.
Great plugin man
I tried to use this plugin, it worked but it took away the rows and columns and just put it in one line.
great plugin, this is awesome…. thank you
*tryin’ to hack it and put it on my joomla site..
dan
If you need help with it, stop by my support forums.
vetweb
It seems kind of pointless “tryin’ to hack it” to work with Joomla, especially since this is a plugin that fixes a bug with WordPress.
Hi Justin,
I tried to exclude a photo form the gallery but it doesn’t work for me [gallery exclude='3444'].
The gallery display photo id #3444 along the others.
I checked the php code but I can’t find any reference to this option.
Any any ?
*idea
Tx8
There is no
excludeparameter for the WordPress gallery shortcode.Hello, do you know if it is possible do add Pager (page 1,2,3.. list) to bigger galleries? I saw something like this on one blog (AJAX style). Do you know plugin like this?
Big thanx for cleaner.. Now i can see that “columns=x” really works..
Yes, it’s possible. Do I know how to do it? No. It’s beyond the scope of this plugin anyway.
Hi Justin,
just installed wp 2.7 and now my galleries don’t seem to work any more – is there a compatibility issue with cleaner gallery plugin?
Cheers,
Merlin
Nope, there’s no incompatibilities with WordPress 2.7. I’m actually using the plugin here on my site.
Thank you so much.
It seems to ignore sort-order when ordering by “Menu order” (default).
Try uploading a bunch of pictures, and use [gallery order="DESC"] and [gallery order="ASC"] – it makes no difference. :/
The fix is easy, change:
‘orderby’ => ‘menu_order ID’,
to
‘orderby’ => ‘menu_order’,
Caveat: not tested how that goes in WP 2.6.
It broke my WP 2.7 version. I now had to delete it, since the Gallery itself offers the option to directly link to the image file (And thus triggering the image floating thingy) anyway…
This effect can be seen on my tech spec page: http://philsblogging.com/tech-specs/
Thanks though!
Just as a note to anyone using this on 2.7. The plugin works with WordPress 2.7, but it has not been updated to accommodate the new features implemented in WP yet.
GoodCleaner WordPress Gallery Plugin
but
is there using with last version WP
After the use of the album can not be arranged, and his party will show a thumbnail.
I am using the 2.7.
Thanks
Hi I used this plug in without any problems on old version of WP. I have upgraded to 2.7 and instead of a photogrid in conjunction with lytebox, the images now run down the left hand side of the page. The pop up gallery still works fine, but its the look of a photogrid I wanted ie 3×3
I’m not a programmer and basically use it “out of the box”, is there a way with 2.7 and cleaner gallery to get back to the photogrid of 3 column galleries please.
Hi Justin, Thanks for this great plugin. It was working pretty fine with 2.6 installation, and i was using featured content plugin as well on homepage. But now recently i upgraded to 2.7 version, and everything got messed up. im a newbie to the coding and stuff, have no idea what to do.
Everyone, the plugin has updated to support WordPress 2.7′s new features. So, download the latest version.
My 2.7 cannot install “WordPress 2.6+ (0.5)” plugin:
Fatal error: require_once() [function.require]: Failed opening required ‘/home/myblog/public_html/blog/wp-content/plugins/cleaner-gallery/settings-admin.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/myblog/public_html/blog/wp-content/plugins/Cleaner WordPress Gallery Plugin 2.6/cleaner-gallery.php on line 54
Just wonder am I doing anything wrong here?
Anyway thanks Justin.
Nova — From what I can tell, you’re incorrectly installing the plugin. Please stop by my support forums if you need help.
Justin, this is an awesome plugin. I spent a day trying to hack around the current one. I’m no WP expert but managed to get it to display just as list items, but I was dammed if I could get the alt or title tag to appear, there appears to be no documentation on it.
This plugin works a treat and puts WP to shame that they didn’t include this out of the box.
I’m off to snoop around in your code to see how the heck you’ve sorted it
@Nova & @Justin Tadlock:
The zip file does not contain a folder, just the files, so if like myself you just wget the zip file on the server and then extract it, you will find all the files littered in …./wp-content/plugins/ rather than …./wp-content/plugins/cleaner-gallery/
This results in the problems Nova was having getting it installed, and also messy files when you unzip.
Please could the zipfile contain a folder with the files inside of that, rather than just the files?
-Thanks
Tom — The code in the latest version (0.5) should be a lot cleaner and easier to “snoop around” in.
I also have plans for giving some more default options such as alternatives to definition lists. Of course, these can be changed on a post-by-post basis, but it’d be nice to make all galleries an unordered list.
MidnighToker — For now, I won’t be doing this:
The reason for this is that many users end up installing the plugin like
/plugins/cleaner-gallery/cleaner-gallery, which screws things up. I can’t even begin to count how many times people have done this, so I just removed the extra folder.Can you add support for slimbox 2 also?
toe_head2001 — As far as I know, it should work fine with Slimbox 2 if you select Slimbox on the settings menu. But, I’ll definitely officially support it by testing it before the next update.
Everything worked fine with Lightbox…until i installed the latest update 0.5
Before: Gallery was display as a 3 x 3 block.
Now: The pictures are displayed in one row / one line downstairs
Ill install the old version now…
Grrr. Cant find the old working version.
Anyone can send me the version 0.4 via Mail!?
Hisky — Please don’t insult me by coming to my blog and asking for someone to send you version 0.4, especially after I took a few minutes out of my day to personally reply to your email about this.
Version 0.5 is perfectly stable and being used on literally thousands of sites. If there were an issue, I would address it with a new
0.5.1bugfix release. In fact, this branch of the plugin has worked so well that the next version will be0.6.Deleted for wasting my time, space, and patience. Please don’t leave comments trying to argue something I’ve already made perfectly clear. It is rude, shows a lack of respect, and will not be tolerated on my personal blog.
Sorry Justin – all i wanted was the old data to see whats the bug.
I found a solution:
After the automatic update from 0.4 to 0.5 the CSS files hat not enough CHMOD rights.
Thats why the layout was broke.
After i set the folder zu CHMOD 755 everything works fine.
Maybe i can help someone else with those few lines…or delete it if you want.
You dont gave me the feeling to being not good enough to ask a question…
Dear Justin,
I have a weird problem with your plugin and I suspect it has something to do with the theme i’m using (Cutline 1.1 on WordPress 2.7.1). When activating Cleaner Gallery, the gallery of a post isn’t displayed, although the respective HTML code is inserted into the post (for example: http://herr-poerner.de/2009/03/10/test/). When deactivating Cleaner Gallery, the gallery appears, but the WP standard gallery only.
When using other themes, Cleaner Gallery works fine.
Any ideas how to edit my theme’s files?
Cheers,
Bernd
Any news about the exclude feature yet? WordPress doesn’t come up with something like this it seems?
Frank — I’m not sure if I’m adding in an include/exclude feature. The goal of the plugin is to stay as true to the WordPress gallery as possible but to clean up the invalid XHTML.
I’ve also been holding back a bit on it because, if I add in an include/exclude feature, I’d have to allow for multiple galleries per post.
But, I’m always changing my mind about these things. So, there’s a possibility for something like that in 0.7 or 0.8.
There was a post last May that included code to add a “row” property. Justin even mentioned that he might add that functionality. I now find that I need this feature but have been unable to successfully implement the code.
Anyone else had any luck with this in v .6?
Thanks for any suggestions or pointers.
Stace — I’m still not really seeing the benefit of a rows argument. JazzPDX’s reasoning for one would be better suited as an include/exclude argument.
Could you explain how a rows argument would be beneficial to you?
Justin – My need for rows is similar to JazzPDX’s: I want to display a small number of images on a front page as a preview/link to larger gallery. If there were a way to specify the maximum number of images to display, that would work, too.
Can you give me an example of the include/exclude argument you suggest?
Thanks
Stace — Yeah, what you’re looking for is more of an include/exclude feature. Several people want this feature, and it’s something I’m considering for version 0.7.
You’d do something like this to include specific images:
Or, something like this to exclude specific images:
A max number of images would be a better solution than rows as well. Rows should not be used to limit the number of images. Rows should behave in the opposite way columns do.
For example, if we had 12 images, inputting a rows argument of 3 should show 3 rows and 4 columns. All images should still be shown.
Basically, the rows argument is no different than the columns argument. It’s just doing the same thing in a different way.
Justin – Thanks for the reply. And, yes, rows as you’ve described them wouldn’t be my solution.
But is there a max image parameter?
The include/exclude image arguments only seem to work with specific image ids. I’m writing this in to a page template where, for layout reasons, only want to display 4 images, 2×2. Which 4 and the order isn’t important.
Thanks
You are the man! Thanks.
Thanx for your release, I downloaded it and tested it in my localhost, and everything looks great. I’m going to upload it on to my blog soon. i´m using arthemia theme and so far it seems great. Thanks for the plugin.
Justin, I’m having the same problem as Bernd, above, using a cutline-based theme on 2.7.1.
With the plug-in enabled, galleries disappear, though the source code is there.
Stace — No, there’s not a max image parameter. This plugin only takes in the same parameters as the normal gallery shortcode.
mccormicky — You’re welcome.
Cirurgia Plastica — No problem. I’m glad it’s working well for you.
Justin – thanks very much for the reply.
So, I find myself back at the beginning: how to display just one or a few images from a gallery on a front page.
I’m using your Structure theme – great theme, by the way – and I know part of the excerpt function grabs a single image from the post for display. I haven’t looked at the code for that but is there some way to utilize some of that same function to achieve what I’m after?
Thanks,
Stace
Stace — What we really need to be doing is presenting these types of things on Trac as this plugin’s gallery functions are going to stay pretty true to the default gallery shortcode. These are the types of things that should be built into core (at least some of them).
There are ways to grab a specific number of images from a post, but a blog’s comment section isn’t really the place to post this type of stuff.
I’ll follow up with the Trac suggestion – thanks for that.
I appreciate that this might not be the best forum to discuss this stuff but can you suggest another location or point me in the right direction? I feel like I’ve combed the WP forums already, without success.
Thanks,
Stace
Stace — I think you misunderstood me. What I mean is that this is a great place to discuss this plugin but not to post code and things that don’t deal specifically with the plugin. Of course, there’s both my support forums and the WP.org forums for those things.
As for the plugin, the next version (we’re currently at 0.6) will have a
numberposts,exclude, andincludefeature. These would be in line with theget_children()function that the gallery shortcode uses.The numberposts argument of the get_children function is indeed that “max images” parameter that I was looking for.
Not sure when v.06 is due but, in the short term, it’s easy enough to add this to the current version.
Go to /plugins/cleaner-gallery/cleaner-gallery.php.
Look for
Add this line
where 4 is the maximum number of images to be displayed. Remember to add the comma to the end of the line above.
Hope this helps others.
Sorry, my code didn’t come out.
Look for this:
/*
* Arguments for get_children()
*/
$children = array(
And add this line at the end:
'numberposts' => 4
Excelent plugin. I find your plugin to be very useful. Thanks
Hi Justin,
Thank you so much for this plugin, it’s fantastic!!
This might be off-topic, but you seemed like someone who might be able to help as my issue concerns the [gallery] short code. I would like to automatically insert id=”##” into the shortcode when my users insert a gallery using the Wordpress WYSIWYG editor. Do you know if there’s any way to do that?
The reason I need it is because the Subscribe2 plugin I’m using doesn’t recognize which images are attached to a post if the ID isn’t inserted in the [gallery] shortcode. I’m trying to avoid making my users touch the HTML of any post.
Thank you so much for any help or advice/direction you can give me!
And THANK YOU for the cleaner gallery plugin, again and again! It rocks.
Michelle
Wow, every time I come up with a wish list for Wordpress, I find that you’ve done it. I’m not overly generous with donations, but you’ll be getting one from me.
Stace — I’ve added the
numberpostsparameter in version 0.6.1. So, it’s ready to go now.Justin – Wonderful! Thanks very much!
Hi Justin,
The numberposts parameter is great but I’d like to suggest taking it one step further.
Would it be possible to specify both how many images you want in your gallery (as it does now) and also how many thumbnails are displayed within your post?
For example, you could have a gallery with 20 images that you want visitors to scroll through but only show the first 2 in your post. Showing all 20 thumbnails would just be overwhelming.
Thanks for the hard work on this plugin.
Well, it’s over a year later, WP is at v 2.7.1 and the gallery function is still spitting out garbage! Thanks a lot Justin.
I wanted to use html tags in the caption, so i made this modification on line 357:
$caption = ( $cleaner_gallery['caption_remove'] ) ? wp_specialchars( $attachment->post_excerpt, 1 ) : $attachment->post_excerpt;I’m sorry, this is the right code:
$caption = ( $cleaner_gallery['caption_link'] ) ? wp_specialchars( $attachment->post_excerpt, 1 ) : $attachment->post_excerpt;It dont work in wp 2.7.1 … I can’t see any images in my gallery
!
Stace — No problem. I’m glad I could help by just adding a few extra lines of code.
Mark — That’s what the
numberpostsparameter is for.Nick Murray — It doesn’t look like WordPress will ever update that. Code is poetry is supposed to be the motto though.
duard — It works perfectly on thousands of blogs running WordPress 2.7.1.
Hi Justin,
Thanks for the reply.
What numberposts does is limit the number of images shown both in the post and the gallery itself.
What I’m suggesting (and it’s simply a suggestion, maybe a bad one) is to add a parameter to be able to limit how many images are shown in the post but still allow the gallery to display all images attached to that post. Does that make sense?
For example, if you have 10 images you want to display via a lightbox gallery script but don’t want 10 thumbnails cluttering your post page, you are able to set the plugin to only show the first thumbnail as en entry point into the rest of your gallery.
Mark — I understand now. But, that’s much outside of the scope of what this plugin should do. You’ll probably have to get someone to make a custom plugin for that. It probably wouldn’t be too hard to do.
Justin – wanted to thank and commend you on your efforts with your plugins and overall involvement in the wordpress community. Hoped I might trouble you for some clarifications on the readme.html document bundled into my freshly downloaded “cleaner” plugin.
I am having an issuing determining how to bring images into my galleries. Finally found a little documentation on the original shortcode and was able to see where my shortcomings were. Reading over the comments above, I was lead to believe I couldn’t exclude certain images. But the readme docment, under the “How to use the plugin” subhead bullets out the exclude parameter as an option.
rlfinc — The
excludeparameter was recently added. Always consult thereadme.htmlfile for the most up-to-date information.Thank you, the prompt response is greatly appreciated.
thank you. I had so much problems with all these gallerys, but these fits very good
Hi Justin,
Mark’s feature request above from June 3, 2009 (“For example, if you have 10 images you want to display via a lightbox gallery script but don’t want 10 thumbnails cluttering your post page, you are able to set the plugin to only show the first thumbnail as en entry point into the rest of your gallery”) is *exactly* what I’m looking for. I’m amazed that none of the other scripts do this. I might want to post one or two photos from a trip but want a lightbox-type gallery to show all 50 photos, for example.
You’d be VERY popular if you wrote such a script!
Stefan — Fortunately, I already have all the popularity I need. Basically, I don’t really care about Lightbox-type scripts. This plugin was written to take care of the invalid XHTML made by the gallery shortcode. The Lightbox stuff is just a fun extension. I doubt it’ll ever get beefed up (though one can never predict the future).
First let me thank you for a great plugin. When I upgraded from .61 to .7 it messed up the gallery display so that the images only show one per line and the spacing between lines is really large so you must scroll to even see the next thumbnail. I went back and it goes back to 3 pictures per row and looks fine. I don’t know if there is a conflict with my css or possibly wordpress. I am using wordpress 2.6.5 and a custom written theme.
An excellent plugin Justin. I recently upgraded to Wordpress 2.8 and the default Thickbox gallery effect I was using no longer works. If there’s anything you can do to remedy it, I’d appreciate it.
Cheers
Will
@will
Check if your cleaner gallery plugin got 755er CHMOD rights.
Or deactivate it, delete it…and re-install it.
That worked in my blog
@hisky
I deactivated the plugin, deleted and re-installed it. I checked for 755 permission on the plugin folder. All good. Still, the Thickbox gallery effect won’t work. I don’t see the Thickbox.js showing up in the source code, which seems odd. Although — I can’t remember if it used to or not. I see the thickbox.css file in the source though.
Here’s a page it used to work on:
http://skepticblog.org/2009/05/05/skeptologists-gallery-3/
I still can’t get the thickbox option to work in wordpress 2.8. it worked in 2.7.1. I’ve tried deactivating all my plugins, and custom css — to no avail. Something is preventing the thickbox effect from working. is anyone else having this problem in 2.8? I may have to switch to a different solution for my wordpress galleries. Except, there isn’t a plugin out there that makes galleries so slick without requiring the blog author to do anything differently than they’d do without this plugin. The process for uploading images doesn’t change with this plugin like it does with nextgen or others. I like that. So, I really want to get it working again. Can anyone help?
I decided to try using a different supported lightbox-type script for the gallery. I downloaded and installed slimbox2, uploaded the javascript to my server, linked to it in the page , uploaded the css and images for slimbox2 and linked to the css in the page , selected “slimbox2″ from the cleaner gallery plugin drop-down menu and saved settings. I then refreshed the page — and — the effect doesn’t work. I still get taken to the image at the full src path with no lightbox effect whatsoever. what gives!
hopefully this will shed some light on this subject. I uploaded the example slimbox2 page to my server (http://skepticblog.org/example.html) and using the paths to the js and css on my server. I tested it and it works perfectly! So, why doesn’t the effect work on the blog page?
problem solved! I was never successful at getting the Thickbox effect to work, but I was able to get the Slimbox2 effect to work because I could control where the slimbox2.js file appeared in my header (after the wp_head call which loads the jquery library). Turns out that jquery.js must be loaded BEFORE the slimbox2.js file, otherwise, slimbox2 doesn’t work.
GREAT
does what I need
Thank you
I was never successful at getting the Thickbox effect to work, but I was able to get the Slimbox2 effect to work because I could control where the slimbox2.js file appeared in my header (after the wp_head call which loads the jquery library).
I want to display description and also possibly html in the description. Please help.
Hi Justin,
For some reason, the function to remove the cleaner gallery css is no longer working on sites where it worked before. I’m wondering if the parameters of the remove_action function have changed in a Wordpress upgrade.
Is anyone else experiencing this problem?
This is the line I used in my functions file:
remove_action( ‘wp_head’, ‘cleaner_gallery_css’ );
Thanks!
I have enabled html in the title field and love it but the one issue I have is when I hover over the image it displays all the text and code in it. Is there a way to change that to say to display caption or some default text when u hover over the image?
or even if the html can be prevented from being shown when you hover over the image. that would work for me too.
Hi there !
I’ve been reading the (numerous ^^) comments, and you’ve asked several times how could a row option be useful. Well, I’m putting a gallery shortcode in my sidebar, in a widget.
This widget’s gonna display the pictures of a certain page. And I don’t want it to be huge, otherwise it’s gonna make my layout look pretty strange.
A row option could help me select the number of pictures I want to display. And I don’t want to choose (include or exclude) which pictures I want to display, because the purpose of the widget is to show the latest pictures, and I can’t change the pictures to include or exclude everytime I’m uploading a new picture..
I haven’t tried your plugin nor JazzPDX code yet but I’m highly interested in that row property !
Not a very useful comment I know, but keep on the good job !
Thanks for this Justin,
I find that everyone jumps right to using a plugin for Gallery management when there’s a robust gallery feature already included in the standard build. I managed to manipulate your code output a bit to remove the rows; allowing me to turn a WordPress Gallery into a cross fading JavaScript slideshow using the jQuery Cycle plugin. I hope the functionality of the Galleries within WordPress improves in the future to allow for better management (re-using images without the need to re-upload).
I’ve recently included it in my 10 Perfect Plugins for Building a WordPress CMS blog post. Keep up the great work, and thanks!
Kevin, skepticwebguy, and Kishore — If you need help with the plugin, please ask your questions in my support forums.
Juergen Schulze — You’re welcome. I’m glad you like the plugin.
Brad — Thanks for the update on this. I’ll change the docs with the next update.
Julie — I’m still not convinced. Why wouldn’t the
numberpostsparameter work?Kevin — Thanks for mentioning the plugin in your article. There’s loads of useful applications built right into the core. We just have to take advantage of them. I’ve also been considering implementing integration options for something like the jQuery Cycle plugin and others like it. Maybe I’ll get around to that before the 1.0 release.
Is their a way to display the description on the thumbnail page beneath the caption?
Thank you very much, very nice plugin. I will try it.
Again thx for your great work Justin, but the default thickbox gallery no longer works for me too, did i miss something for the setting?
I am using fancybox and the fancybox-gallery-integration-plugin, so your plugin isn’t much usefull for me, but here are some things, which would me make using your plugin:
I would like to change the style of the gallery, e.g. the border of the gallery and the border of the pictures. Also the distances between the pictures and what would be really great: A integration of the shadow plugin, so that every picture in the gallery would have a little shadow!
Yeah cool plugin,
but it works not for a rss feed?
i am trying to modifie the “wp-includes/feed-rss2.php” file but i have no clue what i should do, i made several changes wiht out any result.
can someone give me help please?
Ah ok i got it,
in the function cleaner_gallery_shortcode is a if ( is_feed() ), the part where my problems are comming from.
Have been looking for a Wordpress Gallery and this plugin get lots of recommendation. I will give it a go. Thanks!
Using this plugin, is there a way to LINK to your image gallery? Like “click here to access the gallery.” And once the link is clicked it opens up your lightbox gallery?
I will use this Plugin on WP2.8.4 and his wont work. I can Enable an disable this Plugin in Backend but cant find the Plugin in the Preferences.
Th CSS from the Gallery will be load in but not the js.
Thanks! it still works with 2.8.4 version
What happened with the exclude feature? I have v0.7 and I can’t find anything in the readme.html.
I also tried to use it with exclude=”1,2,3″ but it doesn’t seem to work.
Thanks
Hi !
I updated to WP 2.8.5. After that the plugin doesn’t work.
Are there any updates ?
Regards
Ralf
Hi,
thank you for this one. really good. I would like to display a number of picture for my gallery. right now he is showing like all pictures as thumbnails. i want for example him to display one or three thumbnails. that’s it. if he clicks on the thumbnail the whole gallery should be shown!
SKunder — Not with this plugin.
quickfingers — You’re welcome.
kalista — If you need help setting up the plugin, please refer to my support forums.
fabske — Fortunately for you, all of these things can be done with Cleaner Gallery.
Benson — This plugin is about viewing galleries on your site and has nothing to do with your feeds.
Digital Nomad — Let me know how you like it once you’ve tried it out.
Stoik — If you need help with the plugin, stop by my support forums.
Fanatos — Thanks for the update.
dikrhaim — Nothing happened to it. It’s still there.
Ralf Fuhrmann — The plugin works correctly with WordPress 2.8.5. If you need help with it, please refer to my support forums.
Asad — If you need help, stop by my support forums.
Hey,
Thanks for making your plugin available – just wondering why your list of links to lightbox projects isn’t to the wordpress plugin versions? Since your plugin is for wordpress wouldn’t that make more sense?
version — From one viewpoint, that makes sense. However, there are numerous plugins that handle that type of stuff, and I’m not going to test them all to make sure they work correctly. I’d rather be able to say for sure what Cleaner Gallery works with.
Plus, it only takes few lines of code to add JavaScript to your site. I don’t see much point in having a plugin to handle something so simple.
Nice plugin, I was thinking of writing something similar but i dont have the time right now
thanks!
Thanks so much for this plugin. The exclude parameter is something that’s been needed for a while, judging by all the WP Forum posts about it.
One thing, the readme.html needs to be updated with the exclude shortcode usage. There’s no way of knowing about it except for your one post on this page.
Any other shortcode unique to your plugin I should know about? Just asking.
Thanks again.
really great, what i’m looking for long time…
the only thing i can not resolve:
how to aligne left – the gallery???
tried everything with additional html div’s…
thanks
h.
Thanks for the hard work and valid code.
Ive iinstalled this plugin and cant find any read me. Also when insert/upload image then galler it looks no different. I hope you cant help.
Ok my bad I found the read me. But I dont see any option to exclude images or anything different in gallery. Im really hoping you can help!
Does anyone know of a wp plugin to clean up xtml validity errors in general, not just for galleries? I have some plugins, but I notice that all of them generate a lot of errors, and that mess up with my seo efforts. Help please!
Wonderful Plugin! almost solved all my issues with the default WP gallery/
Found a bug, though:
If a person enters a class name in the “alternate script” box which contains within the string the letters ‘id’ (as in highslide), then Cleaner Gallery substitutes the ID number of the page itself for the letters ‘id’. In other words you end up with something like ‘highsl235e’ in the html.
Makes it hard to integrate the Highslide library
.
Thanks this good plugin help me to win lot of time in programmation
good works thanks
Hi, is it possible to call the cleaner gallery from a template?
Something like this:
… but to show cleanerGallery.
Thanks in advanced!
the plugin is super!
Sorry…
How can I call cleanerGallery from a template?
Thanks!
This didn’t work at first so I did a little debugging and there seems to be a conflict when using the 960.gs grid with this plugin. I disabled the 960 stylesheet and the gallery showed up fine. Anybody else experience this?
Figured it out. For those who have trouble using the 960.gs grid w/ this plugin, add these styles…
Had an issue, disabled the plug-in and knew something was up. Went back to this page, found your insight on the 960.gs.grid issue and now this plug-in is back up and running. Simply pleased to have found a solution.
First off, thanks for the great plugin. Second, I’m having an issue with updating the Link URL to a video hosted on Vimeo. It will not keep any changes to that field at all. I set “image link” to blank, but still a no go. Any idea why this would not be working?
Thanks!
Hey. I have a problem with the plugin.
When i users using IE clicks on a gallery image before the gallery is loaded, they get to a single attachement page (and the gallery naturally doesnt load)…
Is there anyway to avoid this, and instead let the gallery load after the picture is clicked?
Best regards Axel.
Email deleted by the administrator. Please never leave your email open for the public to view. Doing so is an open invitation to spammers.
I have been trying to find a photo gallery plugin that allows me to add photos to a custom post type and on the post page not show the gallery images but instead have a button like “photo gallery” and when you click that button it opens a lightbox with all the gallery images. Is this possible?
is there a chance to get first image in middle size from the gallery?
Justin, I need to get integration with Highslide. Basically just set the gallery images to automatically (or optionally) have both ‘class’ and ‘rel’ set to ”highslide’.
Any way to do this?
Justin – looks like you fixed the “id” issue that supposedly as a string part of “highslide” was creating a problem that someone else reported in this thread. From looking at your code I figured out how to tweak admin.php and gallery.php to add highslide from the admin panel. Set it to just add the rel=highslide and class=highslide, and it worked.
Sweetness! Thanks for your plugin.
This is awesome! It’s exactly what I was looking for.
I found one problem. The SRC of wp-includes/js/thickbox/tb-close.png was incorrect so the image is broken. I’m using WP 3.0.1.
Anyway, thanks very much!
Hi there,
I just tried to download the plugin and got a 404 error. Maybe you’re updating?
I’m wondering if there is a way to control how Wp ‘crops’ or places an image that can be viewed in full by clicking. Wp seems to show the middle of the reduced image, and I would prefer to show the top of the image. (If that makes sense.)
By the way, I’m using a Template. However, I believe Wp is controlling the size & placement of the images.
I’m not sure if I can control this with CSS or it requires some PHP tweaking.
Hope to install your plugin!
Best,
Jon
I’m wondering if there is a way to control how Wp ‘crops’ or places an image that can be viewed in full by clicking. Wp seems to show the middle of the reduced image, and I would prefer to show the top of the image. (If that makes sense.)
Justin,
Generally a great update. Please check your website contact email regarding a particular issue. I’d like to believe I’m wrong about it.
Take care.
Johnny
Hi,
i´m using cleaner gallery on a html5 website and stumbled over the fact that rel=”lightbox” doesn t validate html5.
Is there any chance for an update allowing to choose an html5-valid way of implementing lightbox like ‘class=”lightbox”‘ or using the ‘data-’- attribute?
cheers
LichtAnd
Thanks this is great, exactl
Glad I bump into your plugin Justin… I was searching for a plugin to showcase pictures on my site. I have one question though, does this plugin increase page views? For instance, will pictures in each photo album I upload be loaded on a different page or same page when someone clicks next?
Hello
I am using this plugin but I don’t want any text (captions or titles) to display when the mouse hovers over a thumbnail. How do I disable this pop up text?
I just want to add that this plugin is the closest to what I’ve been looking for. Now I can start uploading some photos, hope you keep the plugin updated Justin – since WordPress changes frequently. Thanks!
oke thanks justin… realy, i like very much
How can I make this plugin to be loaded only on post pages and not everywhere?
It’s hard to believe that this many years later, 3.31 still has the inline styling and it doesn’t look like it is getting fixed for 3.4. IMO, WordPress should never produce styles. That is what themes do.
Hi, I have a very important question:
How is it possible, to add more sizes to a shown picture?
You have on one picture for example:
Sizes: 150 × 150 / 300 × 168 / 800 × 450
When I install the plugin, I have only one size per picture.
So how can I change this?!
greetings,
Chriss
Any chance that this might be updated to work with the new carousel that was just released in the Jetpack?
I have an “index” of sorts for different companies logos and I had them linked to their web site so that when you clicked on the logo picture it would send you tho their website, but for some reason now it just send it it the link of the picture not the site. I have all the link in the gallery. They just don’t send to the link.
is this plugin outdated?
No.
First of all, this is a huge plugin, thanks.
Second is it possible that this plugin conflicts with others
JavaScript or jquery inside the theme ??